Class ConnectionHandshakeChannelInitializer

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

public abstract class ConnectionHandshakeChannelInitializer extends io.netty.channel.ChannelInitializer<DrasylChannel>
  • Field Details

    • DEFAULT_HANDSHAKE_TIMEOUT

      public static final Duration DEFAULT_HANDSHAKE_TIMEOUT
    • handshakeTimeout

      protected final Duration handshakeTimeout
    • initiateHandshake

      protected final boolean initiateHandshake
  • Constructor Details

    • ConnectionHandshakeChannelInitializer

      protected ConnectionHandshakeChannelInitializer(Duration handshakeTimeout, boolean initiateHandshake)
    • ConnectionHandshakeChannelInitializer

      protected ConnectionHandshakeChannelInitializer(boolean initiateHandshake)
  • Method Details

    • initChannel

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

      protected abstract void handshakeCompleted(DrasylChannel ch) throws Exception
      Throws:
      Exception
    • handshakeFailed

      protected abstract void handshakeFailed(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)