Package io.grpc.netty
Class ProtocolNegotiators.WaitUntilActiveHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.channel.ChannelDuplexHandler
-
- io.grpc.netty.ProtocolNegotiators.ProtocolNegotiationHandler
-
- io.grpc.netty.ProtocolNegotiators.WaitUntilActiveHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
- Enclosing class:
- ProtocolNegotiators
static final class ProtocolNegotiators.WaitUntilActiveHandler extends ProtocolNegotiators.ProtocolNegotiationHandler
Waits for the channel to be active, and then installs the next Handler. Using this allows subsequent handlers to assume the channel is active and ready to send. Additionally, this aProtocolNegotiationEvent
, with the connection addresses.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
protocolNegotiationEventReceived
-
Constructor Summary
Constructors Constructor Description WaitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelActive(io.netty.channel.ChannelHandlerContext ctx)
protected void
protocolNegotiationEventTriggered(io.netty.channel.ChannelHandlerContext ctx)
private void
replaceOnActive(io.netty.channel.ChannelHandlerContext ctx)
-
Methods inherited from class io.grpc.netty.ProtocolNegotiators.ProtocolNegotiationHandler
fireProtocolNegotiationEvent, getProtocolNegotiationEvent, handlerAdded, handlerAdded0, replaceProtocolNegotiationEvent, userEventTriggered, userEventTriggered0
-
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read, write
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharable
-
-
-
-
Constructor Detail
-
WaitUntilActiveHandler
WaitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger)
-
-
Method Detail
-
channelActive
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception
- Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
protocolNegotiationEventTriggered
protected void protocolNegotiationEventTriggered(io.netty.channel.ChannelHandlerContext ctx)
- Overrides:
protocolNegotiationEventTriggered
in classProtocolNegotiators.ProtocolNegotiationHandler
-
replaceOnActive
private void replaceOnActive(io.netty.channel.ChannelHandlerContext ctx)
-
-