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 a ProtocolNegotiationEvent, with the connection addresses.
  • Field Details

    • protocolNegotiationEventReceived

      boolean protocolNegotiationEventReceived
  • Constructor Details

    • WaitUntilActiveHandler

      WaitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger)
  • Method Details

    • channelActive

      public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
      Specified by:
      channelActive in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
      Throws:
      Exception
    • protocolNegotiationEventTriggered

      protected void protocolNegotiationEventTriggered(io.netty.channel.ChannelHandlerContext ctx)
      Overrides:
      protocolNegotiationEventTriggered in class ProtocolNegotiators.ProtocolNegotiationHandler
    • replaceOnActive

      private void replaceOnActive(io.netty.channel.ChannelHandlerContext ctx)