Class DrasylNodeChannelInitializer

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelInitializer<DrasylChannel>
org.drasyl.node.channel.DrasylNodeChannelInitializer
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class DrasylNodeChannelInitializer extends io.netty.channel.ChannelInitializer<DrasylChannel>
Initialize child DrasylChannels used by DrasylNode.
  • Field Details

  • Constructor Details

  • Method Details

    • initChannel

      protected void initChannel(DrasylChannel ch) throws Exception
      Specified by:
      initChannel in class io.netty.channel.ChannelInitializer<DrasylChannel>
      Throws:
      Exception
    • addToChannelGroup

      protected void addToChannelGroup(DrasylChannel ch)
    • firstStage

      protected void firstStage(DrasylChannel ch)
    • chunkingStage

      protected void chunkingStage(DrasylChannel ch)
      This stages plits ByteBufs that are too big for a single udp datagram.
    • armStage

      protected void armStage(DrasylChannel ch) throws CryptoException
      This stage arms outbound and disarms inbound messages.
      Throws:
      CryptoException
    • serializationStage

      protected void serializationStage(DrasylChannel ch)
      This stage serializes Objects to ByteBuf and vice versa.
    • lastStage

      protected void lastStage(DrasylChannel ch)
      This stage emits Events to node.