@Internal public final class ProtocolNegotiators extends Object
ProtocolNegotiators used by gRPC.| Modifier and Type | Class and Description | 
|---|---|
| static class  | ProtocolNegotiators.AbstractBufferingHandlerBuffers all writes until either  ProtocolNegotiators.AbstractBufferingHandler.writeBufferedAndRemove(ChannelHandlerContext)orProtocolNegotiators.AbstractBufferingHandler.fail(ChannelHandlerContext, Throwable)is called. | 
| Modifier and Type | Method and Description | 
|---|---|
| static ProtocolNegotiator | httpProxy(SocketAddress proxyAddress,
         String proxyUsername,
         String proxyPassword,
         ProtocolNegotiator negotiator)Returns a  ProtocolNegotiatorthat does HTTP CONNECT proxy negotiation. | 
| static ProtocolNegotiator | plaintext()Returns a  ChannelHandlerthat ensures that thehandleris added to the
 pipeline writes to theChannelmay happen immediately, even before it
 is active. | 
| static ProtocolNegotiator | plaintextUpgrade()Returns a  ProtocolNegotiatorused for upgrading to HTTP/2 from HTTP/1.x. | 
| static ProtocolNegotiator | serverPlaintext()Create a server plaintext handler for gRPC. | 
| static ProtocolNegotiator | serverTls(io.netty.handler.ssl.SslContext sslContext)Create a server TLS handler for HTTP/2 capable of using ALPN/NPN. | 
| static ProtocolNegotiator | tls(io.netty.handler.ssl.SslContext sslContext)Returns a  ProtocolNegotiatorthat ensures the pipeline is set up so that TLS will
 be negotiated, thehandleris added and writes to theChannelmay happen immediately, even before the TLS Handshake is complete. | 
public static ProtocolNegotiator serverPlaintext()
public static ProtocolNegotiator serverTls(io.netty.handler.ssl.SslContext sslContext)
public static ProtocolNegotiator httpProxy(SocketAddress proxyAddress, @Nullable String proxyUsername, @Nullable String proxyPassword, ProtocolNegotiator negotiator)
ProtocolNegotiator that does HTTP CONNECT proxy negotiation.public static ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext)
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.public static ProtocolNegotiator plaintextUpgrade()
ProtocolNegotiator used for upgrading to HTTP/2 from HTTP/1.x.public static ProtocolNegotiator plaintext()
ChannelHandler that ensures that the handler is added to the
 pipeline writes to the Channel may happen immediately, even before it
 is active.