Class CyclonShufflingServerHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<OverlayAddressedMessage<CyclonShuffleRequest>>
org.drasyl.handler.membership.cyclon.CyclonShufflingServerHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class CyclonShufflingServerHandler extends io.netty.channel.SimpleChannelInboundHandler<OverlayAddressedMessage<CyclonShuffleRequest>>
Waits for CyclonShuffleRequests sent by CyclonShufflingClientHandler.

This handler should be used together with CyclonShufflingClientHandler and CyclonCodec.

  ChannelPipeline p = ...;
  CyclonView view = CyclonView.ofKeys(8, Set.of(pubKeyA, pubKeyB, ...));
  ...
  p.addLast("cyclon_codec", new CyclonCodec());
  p.addLast("cyclon_client", new CyclonShufflingClientHandler(4, 10_000, view));
  p.addLast("cyclon_server", new CyclonShufflingServerHandler(4, view));
  ...
  
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Constructor Summary

    Constructors
    Constructor
    Description
    CyclonShufflingServerHandler(int shuffleSize, CyclonView view)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    protected void
    channelRead0(io.netty.channel.ChannelHandlerContext ctx, OverlayAddressedMessage<CyclonShuffleRequest> msg)
     

    Methods inherited from class io.netty.channel.SimpleChannelInboundHandler

    channelRead

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved
  • Constructor Details

    • CyclonShufflingServerHandler

      public CyclonShufflingServerHandler(int shuffleSize, CyclonView view)
      Parameters:
      shuffleSize - max. number of neighbors to shuffle (denoted as in the paper)
      view - local peer's (partial) view of the network
  • Method Details