Package org.drasyl.cli.perf.handler
Class PerfSessionRequestorHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.SimpleChannelInboundHandler<PerfMessage>
-
- org.drasyl.cli.perf.handler.PerfSessionRequestorHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
public class PerfSessionRequestorHandler extends io.netty.channel.SimpleChannelInboundHandler<PerfMessage>
Requests a perf session once the channel becomes active or this handler is added to an active channel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PerfSessionRequestorHandler.PerfSessionRequestRejectedException
static class
PerfSessionRequestorHandler.PerfSessionRequestTimeoutException
-
Constructor Summary
Constructors Constructor Description PerfSessionRequestorHandler(PrintStream out, SessionRequest request, long requestTimeoutMillis, boolean waitForDirectConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
void
channelInactive(io.netty.channel.ChannelHandlerContext ctx)
void
channelRead0(io.netty.channel.ChannelHandlerContext ctx, PerfMessage msg)
void
userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)
-
Methods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelRead
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
PerfSessionRequestorHandler
public PerfSessionRequestorHandler(PrintStream out, SessionRequest request, long requestTimeoutMillis, boolean waitForDirectConnection)
-
-
Method Detail
-
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
-
channelRead0
public void channelRead0(io.netty.channel.ChannelHandlerContext ctx, PerfMessage msg)
- Specified by:
channelRead0
in classio.netty.channel.SimpleChannelInboundHandler<PerfMessage>
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt)
- Specified by:
userEventTriggered
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
userEventTriggered
in classio.netty.channel.ChannelInboundHandlerAdapter
-
-