Class CyclonShufflingClientHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<io.netty.channel.AddressedEnvelope<CyclonShuffleResponse,SocketAddress>>
org.drasyl.handler.membership.cyclon.CyclonShufflingClientHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class CyclonShufflingClientHandler
extends io.netty.channel.SimpleChannelInboundHandler<io.netty.channel.AddressedEnvelope<CyclonShuffleResponse,SocketAddress>>
Initiates the "Enhanced Shuffling" algorithm of CYCLON.
This handler should be used together with CyclonShufflingServerHandler and
CyclonCodec.
ChannelPipelinep = ...;CyclonViewview =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
ConstructorsConstructorDescriptionCyclonShufflingClientHandler(int shuffleSize, int shuffleInterval, CyclonView view) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx) protected voidchannelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.AddressedEnvelope<CyclonShuffleResponse, SocketAddress> msg) voidhandlerAdded(io.netty.channel.ChannelHandlerContext ctx) voidhandlerRemoved(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
CyclonShufflingClientHandler
-
-
Method Details
-
handlerAdded
public void handlerAdded(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerAddedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerAddedin classio.netty.channel.ChannelHandlerAdapter
-
handlerRemoved
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerRemovedin interfaceio.netty.channel.ChannelHandler- Overrides:
handlerRemovedin classio.netty.channel.ChannelHandlerAdapter
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelActivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelActivein classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter
-
acceptInboundMessage
- Overrides:
acceptInboundMessagein classio.netty.channel.SimpleChannelInboundHandler<io.netty.channel.AddressedEnvelope<CyclonShuffleResponse,SocketAddress>>
-
channelRead0
protected void channelRead0(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.AddressedEnvelope<CyclonShuffleResponse, SocketAddress> msg) - Specified by:
channelRead0in classio.netty.channel.SimpleChannelInboundHandler<io.netty.channel.AddressedEnvelope<CyclonShuffleResponse,SocketAddress>>
-