package cn.ey.biz.module.system.framework.dynamic_api.core.handler;

import cn.ey.biz.common.pojo.R;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

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

import java.util.*;

/**
 * 请求入口处理
 *
 */
public interface RequestHandler {
	@ResponseBody
	R invoke(HttpServletRequest request, HttpServletResponse response,
			 @PathVariable(required = false) Map<String, Object> pathVariables,
			 @RequestHeader(required = false) Map<String, Object> defaultHeaders,
			 @RequestParam(required = false) Map<String, Object> parameters,
			 @RequestBody(required = false) Map<String, Object> requestBody
	);
}
