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
.
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
ConstructorDescriptionCyclonShufflingClientHandler
(int shuffleSize, int shuffleInterval, CyclonView view) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
channelActive
(io.netty.channel.ChannelHandlerContext ctx) void
channelInactive
(io.netty.channel.ChannelHandlerContext ctx) protected void
channelRead0
(io.netty.channel.ChannelHandlerContext ctx, io.netty.channel.AddressedEnvelope<CyclonShuffleResponse, SocketAddress> msg) void
handlerAdded
(io.netty.channel.ChannelHandlerContext ctx) void
handlerRemoved
(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
channelRead
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
Methods 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:
handlerAdded
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerAdded
in classio.netty.channel.ChannelHandlerAdapter
-
handlerRemoved
public void handlerRemoved(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
handlerRemoved
in interfaceio.netty.channel.ChannelHandler
- Overrides:
handlerRemoved
in classio.netty.channel.ChannelHandlerAdapter
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) - Specified by:
channelInactive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelInactive
in classio.netty.channel.ChannelInboundHandlerAdapter
-
acceptInboundMessage
- Overrides:
acceptInboundMessage
in 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:
channelRead0
in classio.netty.channel.SimpleChannelInboundHandler<io.netty.channel.AddressedEnvelope<CyclonShuffleResponse,
SocketAddress>>
-