Package io.grpc.netty

Class ProtocolNegotiators.ClientTlsProtocolNegotiator

    • Field Detail

      • sslContext

        private final io.netty.handler.ssl.SslContext sslContext
      • executorPool

        private final ObjectPool<? extends java.util.concurrent.Executor> executorPool
      • handshakeCompleteRunnable

        private final java.util.Optional<java.lang.Runnable> handshakeCompleteRunnable
      • executor

        private java.util.concurrent.Executor executor
    • Constructor Detail

      • ClientTlsProtocolNegotiator

        public ClientTlsProtocolNegotiator​(io.netty.handler.ssl.SslContext sslContext,
                                           ObjectPool<? extends java.util.concurrent.Executor> executorPool,
                                           java.util.Optional<java.lang.Runnable> handshakeCompleteRunnable)
    • Method Detail

      • scheme

        public io.netty.util.AsciiString scheme()
        Description copied from interface: ProtocolNegotiator
        The HTTP/2 scheme to be used when sending HEADERS.
        Specified by:
        scheme in interface ProtocolNegotiator
      • newHandler

        public io.netty.channel.ChannelHandler newHandler​(GrpcHttp2ConnectionHandler grpcHandler)
        Description copied from interface: ProtocolNegotiator
        Creates a new handler to control the protocol negotiation. Once the negotiation has completed successfully, the provided handler is installed. Must call grpcHandler.onHandleProtocolNegotiationCompleted() at certain point if the negotiation has completed successfully.
        Specified by:
        newHandler in interface ProtocolNegotiator