Class OutConnectionHandler<T>
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
pt.unl.fct.di.novasys.network.pipeline.ConnectionHandler<T>
pt.unl.fct.di.novasys.network.pipeline.OutConnectionHandler<T>
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
,io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>
,EventListener
,Connection<T>
public class OutConnectionHandler<T>
extends ConnectionHandler<T>
implements io.netty.util.concurrent.GenericFutureListener<io.netty.channel.ChannelFuture>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Constructor Summary
ConstructorsConstructorDescriptionOutConnectionHandler
(Host peer, io.netty.bootstrap.Bootstrap bootstrap, OutConnListener<T> listener, MessageListener<T> consumer, ISerializer<T> serializer, io.netty.channel.EventLoop loop, Attributes selfAttrs, int hbInterval, int hbTolerance) -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelActive
(io.netty.channel.ChannelHandlerContext ctx) void
channelInactive
(io.netty.channel.ChannelHandlerContext ctx) void
void
exceptionCaught
(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) void
internalUserEventTriggered
(io.netty.channel.ChannelHandlerContext ctx, Object evt) void
operationComplete
(io.netty.channel.ChannelFuture future) void
sendMessage
(T msg) void
sendMessage
(T msg, io.netty.util.concurrent.Promise<Void> promise) toString()
Methods inherited from class pt.unl.fct.di.novasys.network.pipeline.ConnectionHandler
channelRead, getLoop, getPeer, getPeerAttributes, getReceivedAppBytes, getReceivedAppMessages, getReceivedControlBytes, getReceivedControlMessages, getSelfAttributes, getSentAppBytes, getSentAppMessages, getSentControlBytes, getSentControlMessages, isInbound, isOutbound, userEventTriggered, write
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
handlerAdded, handlerRemoved, isSharable
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved
-
Constructor Details
-
OutConnectionHandler
public OutConnectionHandler(Host peer, io.netty.bootstrap.Bootstrap bootstrap, OutConnListener<T> listener, MessageListener<T> consumer, ISerializer<T> serializer, io.netty.channel.EventLoop loop, Attributes selfAttrs, int hbInterval, int hbTolerance)
-
-
Method Details
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
sendMessage
- Specified by:
sendMessage
in interfaceConnection<T>
-
sendMessage
- Specified by:
sendMessage
in interfaceConnection<T>
-
disconnect
public void disconnect()- Specified by:
disconnect
in interfaceConnection<T>
-
internalUserEventTriggered
-
exceptionCaught
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelHandler
- Specified by:
exceptionCaught
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
exceptionCaught
in classio.netty.channel.ChannelInboundHandlerAdapter
-
operationComplete
public void operationComplete(io.netty.channel.ChannelFuture future) - Specified by:
operationComplete
in interfaceio.netty.util.concurrent.GenericFutureListener<T>
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
toString
-