Interface NioLifecycle

All Known Implementing Classes:
BootNioLifecycleHandler

public interface NioLifecycle
Version:
1.0
Author:
Changski Tie Zheng Zhang 张铁铮, 魏泽北, 杜旺财, 杜富贵
  • 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

      String beforeSendingError(String errorContent)
      step2
      Parameters:
      errorContent -
      Returns:
    • beforeLogging

      String beforeLogging(String log)
      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