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.ConnectionChannelInitializer
org.drasyl.node.channel.DrasylNodeChannelInitializer
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
Initialize child
JavaDrasylChannels used by DrasylNode.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsFields inherited from class org.drasyl.channel.ConnectionChannelInitializer
DEFAULT_SERVER_PORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis stage arms outbound and disarms inbound messages.protected voidprotected voidhandshakeCompleted(io.netty.channel.ChannelHandlerContext ctx) protected voidhandshakeFailed(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) protected voidprotected voidThis stage emitsEvents tonode.protected voidThis stage serializesObjectstoByteBufand vice versa.Methods inherited from class io.netty.channel.ChannelInitializer
channelRegistered, exceptionCaught, handlerAdded, handlerRemovedMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods 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:
initChannelin classConnectionChannelInitializer- Throws:
Exception
-
handshakeCompleted
protected void handshakeCompleted(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handshakeCompletedin classConnectionChannelInitializer
-
handshakeFailed
- Specified by:
handshakeFailedin classConnectionChannelInitializer
-
firstStage
-
armStage
This stage arms outbound and disarms inbound messages.- Throws:
CryptoException
-
serializationStage
This stage serializesObjectstoByteBufand vice versa. -
lastStage
This stage emitsEvents tonode.
-