Class InternetDiscoverySuperPeerHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
org.drasyl.handler.remote.internet.InternetDiscoverySuperPeerHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler
Direct Known Subclasses:
TraversingInternetDiscoverySuperPeerHandler

@UnstableApi public class InternetDiscoverySuperPeerHandler extends io.netty.channel.ChannelDuplexHandler
Operates as a super peer allowing other nodes to join as children. Relays inbound/Route outbound messages to children.
See Also:
  • Field Details

  • Constructor Details

    • InternetDiscoverySuperPeerHandler

      public InternetDiscoverySuperPeerHandler(HopCount hopLimit)
    • InternetDiscoverySuperPeerHandler

      public InternetDiscoverySuperPeerHandler(byte hopLimit)
  • Method Details

    • handlerAdded

      public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      handlerAdded in interface io.netty.channel.ChannelHandler
      Overrides:
      handlerAdded in class io.netty.channel.ChannelHandlerAdapter
    • channelActive

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelActive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
    • channelInactive

      public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
      Specified by:
      channelInactive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelInactive in class io.netty.channel.ChannelInboundHandlerAdapter
    • channelRead

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
    • relayMessage

      protected void relayMessage(io.netty.channel.ChannelHandlerContext ctx, InetAddressedMessage<RemoteMessage> addressedMsg, InetSocketAddress inetAddress)
    • config

      protected static DrasylServerChannelConfig config(io.netty.channel.ChannelHandlerContext ctx)