private void logMessage(ChannelHandlerContext ctx, String eventName, Object msg) { logger.trace(format(ctx, formatMessage(eventName, msg))); }
@Override public void flush(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "FLUSH")); ctx.flush(); }
@Override public void userEventTriggered(final ChannelHandlerContext ctx, Object evt) throws Exception { if (evt instanceof SslHandshakeCompletionEvent) { logger.trace(format(ctx, "SslHandshakeCompletionEvent: "), ((SslHandshakeCompletionEvent) evt).cause()); } else if (evt instanceof Exception) { logger.trace(format(ctx, "Exception: "), (Exception) evt); } else { logger.trace(format(ctx, "USER_EVENT: " + evt)); } super.userEventTriggered(ctx, evt); }
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "ACTIVE")); super.channelActive(ctx); }
@Override public void bind(ChannelHandlerContext ctx, SocketAddress localAddress, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "BIND(" + localAddress + ')')); super.bind(ctx, localAddress, promise); }
@Override public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "DISCONNECT()")); super.disconnect(ctx, promise); }
@Override public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "CONNECT(" + remoteAddress + ", " + localAddress + ')')); super.connect(ctx, remoteAddress, localAddress, promise); }
@Override public void channelRegistered(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "REGISTERED")); super.channelRegistered(ctx); }
@Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "UNREGISTERED")); super.channelUnregistered(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "INACTIVE")); super.channelInactive(ctx); }
@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "CLOSE()")); super.close(ctx, promise); }
@Override public void deregister(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "DEREGISTER()")); super.deregister(ctx, promise); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { logger.trace(format(ctx, "EXCEPTION: " + cause), cause); super.exceptionCaught(ctx, cause); }
@Override public void flush(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "FLUSH")); ctx.flush(); }
@Override public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "CLOSE()")); super.close(ctx, promise); }
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "ACTIVE")); super.channelActive(ctx); }
@Override public void channelInactive(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "INACTIVE")); super.channelInactive(ctx); }
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { logger.trace(format(ctx, "EXCEPTION: " + cause), cause); super.exceptionCaught(ctx, cause); }
@Override public void channelUnregistered(ChannelHandlerContext ctx) throws Exception { logger.trace(format(ctx, "UNREGISTERED")); super.channelUnregistered(ctx); }
@Override public void disconnect(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { logger.trace(format(ctx, "DISCONNECT()")); super.disconnect(ctx, promise); }