Class AccessLogHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
tech.riemann.nif.support.tiangong.connector.AccessLogHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class AccessLogHandler extends io.netty.channel.ChannelInboundHandlerAdapter
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final io.netty.util.AttributeKey<String>
     
    static final io.netty.util.AttributeKey<String>
     
    static final io.netty.util.AttributeKey<String>
     
    static final io.netty.util.AttributeKey<String>
     
    static final io.netty.util.AttributeKey<String>
     
    static final io.netty.util.AttributeKey<Long>
     
    static final io.netty.util.AttributeKey<String>
     
    static final io.netty.util.AttributeKey<String>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    static void
    logResponse(io.netty.channel.ChannelHandlerContext ctx, int status, long writtenBytes)
     

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Field Details

    • START_TIME_KEY

      public static final io.netty.util.AttributeKey<Long> START_TIME_KEY
    • REMOTE_ADDR_KEY

      public static final io.netty.util.AttributeKey<String> REMOTE_ADDR_KEY
    • METHOD_KEY

      public static final io.netty.util.AttributeKey<String> METHOD_KEY
    • URI_KEY

      public static final io.netty.util.AttributeKey<String> URI_KEY
    • PROTOCOL_KEY

      public static final io.netty.util.AttributeKey<String> PROTOCOL_KEY
    • USER_AGENT_KEY

      public static final io.netty.util.AttributeKey<String> USER_AGENT_KEY
    • REFERER_KEY

      public static final io.netty.util.AttributeKey<String> REFERER_KEY
    • HOST_KEY

      public static final io.netty.util.AttributeKey<String> HOST_KEY
  • Constructor Details

    • AccessLogHandler

      public AccessLogHandler()
  • Method Details

    • channelRead

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • logResponse

      public static void logResponse(io.netty.channel.ChannelHandlerContext ctx, int status, long writtenBytes)