Package io.grpc.netty

Class InternalProtocolNegotiators

java.lang.Object
io.grpc.netty.InternalProtocolNegotiators

public final class InternalProtocolNegotiators extends Object
Internal accessor for ProtocolNegotiators.
  • Method Details

    • tls

      public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable)
      Returns a ProtocolNegotiator that ensures the pipeline is set up so that TLS will be negotiated, the handler is added and writes to the Channel may happen immediately, even before the TLS Handshake is complete.
      Parameters:
      executorPool - a dedicated Executor pool for time-consuming TLS tasks
    • tls

      public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext)
      Returns a ProtocolNegotiator that ensures the pipeline is set up so that TLS will be negotiated, the handler is added and writes to the Channel may happen immediately, even before the TLS Handshake is complete.
    • serverTls

      public static InternalProtocolNegotiator.ProtocolNegotiator serverTls(io.netty.handler.ssl.SslContext sslContext)
      Returns a ProtocolNegotiator that ensures the pipeline is set up so that TLS will be negotiated, the server TLS handler is added and writes to the Channel may happen immediately, even before the TLS Handshake is complete.
    • plaintext

      Returns a ProtocolNegotiator for plaintext client channel.
    • serverPlaintext

      public static InternalProtocolNegotiator.ProtocolNegotiator serverPlaintext()
      Returns a ProtocolNegotiator for plaintext server channel.
    • waitUntilActiveHandler

      public static io.netty.channel.ChannelHandler waitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger)
      Internal version of ProtocolNegotiators.WaitUntilActiveHandler.
    • grpcNegotiationHandler

      public static io.netty.channel.ChannelHandler grpcNegotiationHandler(GrpcHttp2ConnectionHandler next)
      Internal version of ProtocolNegotiators.GrpcNegotiationHandler.
    • clientTlsHandler

      public static io.netty.channel.ChannelHandler clientTlsHandler(io.netty.channel.ChannelHandler next, io.netty.handler.ssl.SslContext sslContext, String authority, ChannelLogger negotiationLogger)