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 a
ProtocolNegotiationEvent, with the connection addresses.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWaitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger) -
Method Summary
Modifier and TypeMethodDescriptionvoidchannelActive(io.netty.channel.ChannelHandlerContext ctx) protected voidprotocolNegotiationEventTriggered(io.netty.channel.ChannelHandlerContext ctx) private voidreplaceOnActive(io.netty.channel.ChannelHandlerContext ctx) Methods inherited from class ProtocolNegotiators.ProtocolNegotiationHandler
fireProtocolNegotiationEvent, getProtocolNegotiationEvent, handlerAdded, handlerAdded0, replaceProtocolNegotiationEvent, userEventTriggered, userEventTriggered0Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read, writeMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaughtMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerRemoved, isSharableMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerRemoved
-
Field Details
-
protocolNegotiationEventReceived
boolean protocolNegotiationEventReceived
-
-
Constructor Details
-
WaitUntilActiveHandler
WaitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger)
-
-
Method Details
-
channelActive
-
protocolNegotiationEventTriggered
protected void protocolNegotiationEventTriggered(io.netty.channel.ChannelHandlerContext ctx) - Overrides:
protocolNegotiationEventTriggeredin classProtocolNegotiators.ProtocolNegotiationHandler
-
replaceOnActive
private void replaceOnActive(io.netty.channel.ChannelHandlerContext ctx)
-