Package org.drasyl.node.channel
Class DrasylNodeChannelInitializer
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<DrasylChannel>
org.drasyl.channel.ConnectionHandshakeChannelInitializer
org.drasyl.node.channel.DrasylNodeChannelInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
Initialize child
DrasylChannel
s used by DrasylNode
.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Fields inherited from class org.drasyl.channel.ConnectionHandshakeChannelInitializer
DEFAULT_HANDSHAKE_TIMEOUT, handshakeTimeout, initiateHandshake
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
This stage arms outbound and disarms inbound messages.protected void
protected void
This stage splitsByteBuf
s that are too big for a single udp datagram.protected void
protected void
protected void
handshakeFailed
(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected void
protected void
This stage emitsEvent
s tonode
.protected void
This stage serializesObjects
toByteBuf
and vice versa.Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemoved
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Field Details
-
PROTOCOL_OVERHEAD
public static final int PROTOCOL_OVERHEAD- See Also:
-
-
Constructor Details
-
DrasylNodeChannelInitializer
-
-
Method Details
-
initChannel
- Overrides:
initChannel
in classConnectionHandshakeChannelInitializer
- Throws:
Exception
-
handshakeCompleted
- Specified by:
handshakeCompleted
in classConnectionHandshakeChannelInitializer
-
arqStage
-
handshakeFailed
- Specified by:
handshakeFailed
in classConnectionHandshakeChannelInitializer
-
firstStage
-
chunkingStage
This stage splitsByteBuf
s that are too big for a single udp datagram. -
armStage
This stage arms outbound and disarms inbound messages.- Throws:
CryptoException
-
serializationStage
This stage serializesObjects
toByteBuf
and vice versa. -
lastStage
This stage emitsEvent
s tonode
.
-