public final class ProtocolNegotiators extends Object
ProtocolNegotiators used by gRPC.| Modifier and Type | Method and Description |
|---|---|
static ProtocolNegotiator |
plaintext()
Returns a
ChannelHandler that ensures that the handler is added to the
pipeline writes to the Channel may happen immediately, even before it is active. |
static ProtocolNegotiator |
plaintextUpgrade()
Returns a
ProtocolNegotiator used for upgrading to HTTP/2 from HTTP/1.x. |
static ChannelHandler |
serverTls(SSLEngine sslEngine)
Create a TLS handler for HTTP/2 capable of using ALPN/NPN.
|
static ProtocolNegotiator |
tls(SslContext sslContext,
InetSocketAddress inetAddress)
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. |
public static ChannelHandler serverTls(SSLEngine sslEngine)
public static ProtocolNegotiator tls(SslContext sslContext, InetSocketAddress inetAddress)
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.