Interface NioLifecycle
- All Known Implementing Classes:
BootNioLifecycleHandler
public interface NioLifecycle
- Version:
- 1.0
- Author:
- Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
-
Method Summary
Modifier and TypeMethodDescriptionvoidafterLogging(io.netty.handler.codec.http.HttpHeaders httpHeaders, io.netty.handler.codec.http.HttpMethod httpMethod, String httpRequestUri, String httpPostRequestBody, ServiceContext context, long queuingTime, long processTime, long responseTime, long responseContentLength, String logContent, Throwable ioEx) step4voidafterService(RequestProcessor processor, io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders httpRequestHeaders, io.netty.handler.codec.http.HttpMethod httptMethod, String httpRequestPath, Map<String, List<String>> queryParams, String httpPostRequestBody, ServiceContext context) step1beforeLogging(String log) step3beforeSendingError(String errorContent) step2booleanpreProcess(RequestProcessor processor, io.netty.handler.codec.http.HttpHeaders httpRequestHeaders, String httpRequestPath, ServiceContext context) step0 - do any validation checks before processing
-
Method Details
-
preProcess
boolean preProcess(RequestProcessor processor, io.netty.handler.codec.http.HttpHeaders httpRequestHeaders, String httpRequestPath, ServiceContext context) throws Exception step0 - do any validation checks before processing- Parameters:
processor-httpRequestHeaders-httpRequestPath-context-- Returns:
- true if good to process request, otherwise false
- Throws:
Exception
-
afterService
void afterService(RequestProcessor processor, io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpHeaders httpRequestHeaders, io.netty.handler.codec.http.HttpMethod httptMethod, String httpRequestPath, Map<String, List<String>> queryParams, String httpPostRequestBody, ServiceContext context) step1- Parameters:
processor-ctx-httpRequestHeaders-httptMethod-httpRequestPath-queryParams-httpPostRequestBody-context-
-
beforeSendingError
step2- Parameters:
errorContent-- Returns:
-
beforeLogging
step3- Parameters:
log-- Returns:
-
afterLogging
void afterLogging(io.netty.handler.codec.http.HttpHeaders httpHeaders, io.netty.handler.codec.http.HttpMethod httpMethod, String httpRequestUri, String httpPostRequestBody, ServiceContext context, long queuingTime, long processTime, long responseTime, long responseContentLength, String logContent, Throwable ioEx) throws Exception step4- Parameters:
httpHeaders-httpMethod-httpRequestUri-httpPostRequestBody-context-queuingTime-processTime-responseTime-responseContentLength-logContent-ioEx-- Throws:
Exception
-