Package com.automation_pros.odva.encap
Class NettyLogger
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelDuplexHandler
-
- com.automation_pros.odva.encap.NettyLogger
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
public class NettyLogger extends io.netty.channel.ChannelDuplexHandler
-
-
Constructor Summary
Constructors Constructor Description NettyLogger(org.slf4j.Logger log, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(io.netty.channel.ChannelHandlerContext ctx, java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise)
void
channelInactive(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, java.net.SocketAddress remoteAddress, java.net.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, java.lang.Throwable cause)
void
write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise)
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelRead, channelReadComplete, channelRegistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Method Detail
-
bind
public void bind(io.netty.channel.ChannelHandlerContext ctx, java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
bind
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
bind
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
close
public void close(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
close
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
close
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
connect
public void connect(io.netty.channel.ChannelHandlerContext ctx, java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
connect
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
connect
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
deregister
public void deregister(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
deregister
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
deregister
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
disconnect
public void disconnect(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
disconnect
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
disconnect
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg, io.netty.channel.ChannelPromise promise) throws java.lang.Exception
- Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classio.netty.channel.ChannelDuplexHandler
- Throws:
java.lang.Exception
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
- Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
channelUnregistered
public void channelUnregistered(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
- Specified by:
channelUnregistered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelUnregistered
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable cause) throws java.lang.Exception
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
-