Package org.chenile.http.handler
Class HttpEntryPoint
java.lang.Object
org.chenile.http.handler.HttpEntryPoint
- All Implemented Interfaces:
- HttpRequestHandler
This is a generic controller that is used if JSON is used to configure a Chenile service.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final ChenileEntryPointprivate final LocaleResolverprivate static final ObjectMapperprivate final OperationDefinitionprivate final ChenileServiceDefinition
- 
Constructor SummaryConstructorsConstructorDescriptionHttpEntryPoint(ChenileServiceDefinition serviceDefinition, OperationDefinition operationDefinition, ChenileEntryPoint chenileEntryPoint) 
- 
Method SummaryModifier and TypeMethodDescriptionextractPathVariables(String url, String pathInfo) getHeaders(OperationDefinition od, HttpServletRequest httpServletRequest) static Map<String,MultipartFile> getMultiPartMap(HttpServletRequest httpServletRequest) getSuccessHttpStatus(Object response) voidhandleRequest(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) private voidprocessFailure(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) private voidprocessResponse(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) private voidprocessResponsePdf(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, int httpStatusCode) private voidprocessSuccess(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) private voidprocessWarningsIfAny(ChenileExchange exchange, HttpServletResponse httpServletResponse) private voidsetBody(HttpServletRequest httpServletRequest, ChenileExchange exchange) 
- 
Field Details- 
serviceDefinition
- 
operationDefinition
- 
chenileEntryPoint
- 
localeResolver
- 
om
 
- 
- 
Constructor Details- 
HttpEntryPointpublic HttpEntryPoint(ChenileServiceDefinition serviceDefinition, OperationDefinition operationDefinition, ChenileEntryPoint chenileEntryPoint) 
 
- 
- 
Method Details- 
handleRequestpublic void handleRequest(@NonNull HttpServletRequest httpServletRequest, @NonNull HttpServletResponse httpServletResponse) throws ServletException, IOException - Specified by:
- handleRequestin interface- HttpRequestHandler
- Throws:
- ServletException
- IOException
 
- 
getMultiPartMap
- 
processSuccessprivate void processSuccess(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception - Throws:
- Exception
 
- 
processFailureprivate void processFailure(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException - Throws:
- ServletException
- IOException
 
- 
processResponsePdfprivate void processResponsePdf(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, int httpStatusCode) throws ServletException, IOException - Throws:
- ServletException
- IOException
 
- 
processResponseprivate void processResponse(ChenileExchange exchange, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception - Throws:
- Exception
 
- 
processWarningsIfAnyprivate void processWarningsIfAny(ChenileExchange exchange, HttpServletResponse httpServletResponse) 
- 
getSuccessHttpStatus
- 
setBodyprivate void setBody(HttpServletRequest httpServletRequest, ChenileExchange exchange) throws IOException - Throws:
- IOException
 
- 
getHeaderspublic static Map<String,Object> getHeaders(OperationDefinition od, HttpServletRequest httpServletRequest) 
- 
extractPathVariables
 
-