@ChannelHandler.Sharable
public class LoggingHandler
extends io.netty.channel.ChannelDuplexHandler
Modifier and Type | Field and Description |
---|---|
protected org.slf4j.Logger |
logger |
Constructor and Description |
---|
LoggingHandler(org.slf4j.Logger logger) |
LoggingHandler(String loggerName) |
Modifier and Type | Method and Description |
---|---|
void |
addLoggingHandler(io.netty.channel.ChannelHandlerContext ctx) |
void |
bind(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
close(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
connect(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress remoteAddress,
SocketAddress localAddress,
io.netty.channel.ChannelPromise promise) |
void |
deregister(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
disconnect(io.netty.channel.ChannelHandlerContext ctx,
io.netty.channel.ChannelPromise promise) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
void |
flush(io.netty.channel.ChannelHandlerContext ctx) |
protected String |
format(io.netty.channel.ChannelHandlerContext ctx,
String message) |
void |
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx,
Object evt) |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
channelReadComplete, channelWritabilityChanged
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
public LoggingHandler(String loggerName)
public LoggingHandler(org.slf4j.Logger logger)
public void addLoggingHandler(io.netty.channel.ChannelHandlerContext ctx)
public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelRegistered
in interface io.netty.channel.ChannelInboundHandler
channelRegistered
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelUnregistered
in interface io.netty.channel.ChannelInboundHandler
channelUnregistered
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) throws Exception
exceptionCaught
in interface io.netty.channel.ChannelHandler
exceptionCaught
in interface io.netty.channel.ChannelInboundHandler
exceptionCaught
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception
userEventTriggered
in interface io.netty.channel.ChannelInboundHandler
userEventTriggered
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void bind(io.netty.channel.ChannelHandlerContext ctx, SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws Exception
bind
in interface io.netty.channel.ChannelOutboundHandler
bind
in class io.netty.channel.ChannelDuplexHandler
Exception
public void connect(io.netty.channel.ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws Exception
connect
in interface io.netty.channel.ChannelOutboundHandler
connect
in class io.netty.channel.ChannelDuplexHandler
Exception
public void disconnect(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws Exception
disconnect
in interface io.netty.channel.ChannelOutboundHandler
disconnect
in class io.netty.channel.ChannelDuplexHandler
Exception
public void close(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws Exception
close
in interface io.netty.channel.ChannelOutboundHandler
close
in class io.netty.channel.ChannelDuplexHandler
Exception
public void deregister(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws Exception
deregister
in interface io.netty.channel.ChannelOutboundHandler
deregister
in class io.netty.channel.ChannelDuplexHandler
Exception
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
channelRead
in interface io.netty.channel.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception
write
in interface io.netty.channel.ChannelOutboundHandler
write
in class io.netty.channel.ChannelDuplexHandler
Exception
public void flush(io.netty.channel.ChannelHandlerContext ctx) throws Exception
flush
in interface io.netty.channel.ChannelOutboundHandler
flush
in class io.netty.channel.ChannelDuplexHandler
Exception
Copyright © 2018. All rights reserved.