@ChannelHandler.Sharable
public class TrafficLoggingHandler
extends io.netty.handler.logging.LoggingHandler
A Netty handler that logs the I/O traffic of a connection.
| Constructor and Description |
|---|
TrafficLoggingHandler(io.netty.handler.logging.LogLevel level) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise) |
bind, channelActive, channelInactive, channelRead, channelReadComplete, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, format, format, format, level, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharablepublic TrafficLoggingHandler(io.netty.handler.logging.LogLevel level)
public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.handler.logging.LoggingHandlerpublic void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx)
channelUnregistered in interface io.netty.channel.ChannelInboundHandlerchannelUnregistered in class io.netty.handler.logging.LoggingHandlerpublic void flush(io.netty.channel.ChannelHandlerContext ctx)
flush in interface io.netty.channel.ChannelOutboundHandlerflush in class io.netty.handler.logging.LoggingHandlerpublic void write(io.netty.channel.ChannelHandlerContext ctx,
java.lang.Object msg,
io.netty.channel.ChannelPromise promise)
throws java.lang.Exception
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.handler.logging.LoggingHandlerjava.lang.Exception