Package io.grpc.netty

Class 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 Detail

      • protocolNegotiationEventReceived

        boolean protocolNegotiationEventReceived
    • 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 interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        java.lang.Exception
      • replaceOnActive

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