Class BootHttpLifecycleHandler
java.lang.Object
org.summerboot.jexpress.nio.server.BootHttpLifecycleHandler
- All Implemented Interfaces:
HttpLifecycleHandler
- Version:
- 1.0
- Author:
- Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterLogging(String logContent, 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, Throwable ioEx) step4voidafterProcess(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 originallLogContent, 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, Throwable ioEx) step3beforeSendingError(String errorContent) step2booleanbeofreProcess(RequestProcessor processor, io.netty.handler.codec.http.HttpHeaders httpRequestHeaders, String httpRequestPath, ServiceContext context) step0 - do any validation checks before processing
-
Constructor Details
-
BootHttpLifecycleHandler
public BootHttpLifecycleHandler()
-
-
Method Details
-
beofreProcess
public boolean beofreProcess(RequestProcessor processor, io.netty.handler.codec.http.HttpHeaders httpRequestHeaders, String httpRequestPath, ServiceContext context) throws Exception Description copied from interface:HttpLifecycleHandlerstep0 - do any validation checks before processing- Specified by:
beofreProcessin interfaceHttpLifecycleHandler- Returns:
- true if good to process request, otherwise false
- Throws:
Exception
-
afterProcess
public void afterProcess(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) Description copied from interface:HttpLifecycleHandlerstep1- Specified by:
afterProcessin interfaceHttpLifecycleHandler
-
beforeSendingError
Description copied from interface:HttpLifecycleHandlerstep2- Specified by:
beforeSendingErrorin interfaceHttpLifecycleHandler- Returns:
-
beforeLogging
public String beforeLogging(String originallLogContent, 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, Throwable ioEx) Description copied from interface:HttpLifecycleHandlerstep3- Specified by:
beforeLoggingin interfaceHttpLifecycleHandler- Returns:
-
afterLogging
public void afterLogging(String logContent, 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, Throwable ioEx) Description copied from interface:HttpLifecycleHandlerstep4- Specified by:
afterLoggingin interfaceHttpLifecycleHandler
-