All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mtons.freemarker.directive.HttpServletDirective Maven / Gradle / Ivy

/*
+--------------------------------------------------------------------------
|   Mtons [#RELEASE_VERSION#]
|   ========================================
|   Copyright (c) 2014, 2015 mtons. All Rights Reserved
|   http://www.mtons.com
+---------------------------------------------------------------------------
*/
package mtons.freemarker.directive;

import mtons.freemarker.Privacy;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 接口指令
 * Created by langhsu on 2015/11/26.
 */
public interface HttpServletDirective {
    void execute(HttpMessageConverter messageConverter, MediaType mediaType, String callback,
                 HttpServletRequest request, HttpServletResponse response) throws Exception;

    /**
     * 隐私级别
     * @return Privacy
     */
    default Privacy privacy() {
        return Privacy.OPEN;
    }
}