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
CyclonShuffleRequest
s 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", newCyclonCodec
()); p.addLast("cyclon_client", newCyclonShufflingClientHandler
(4, 10_000, view)); p.addLast("cyclon_server", newCyclonShufflingServerHandler
(4, view)); ...
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
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
- Parameters:
shuffleSize
- max. number of neighbors to shuffle (denoted as ℓ in the paper)view
- local peer's (partial) view of the network
-
-
Method Details
-
acceptInboundMessage
- Overrides:
acceptInboundMessage
in classio.netty.channel.SimpleChannelInboundHandler<OverlayAddressedMessage<CyclonShuffleRequest>>
-
channelRead0
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, OverlayAddressedMessage<CyclonShuffleRequest> msg) - Specified by:
channelRead0
in classio.netty.channel.SimpleChannelInboundHandler<OverlayAddressedMessage<CyclonShuffleRequest>>
-