@Internal public final class ProtocolNegotiators extends Object
ProtocolNegotiator
s used by gRPC.Modifier and Type | Class and Description |
---|---|
static class |
ProtocolNegotiators.AbstractBufferingHandler
Buffers all writes until either
ProtocolNegotiators.AbstractBufferingHandler.writeBufferedAndRemove(ChannelHandlerContext) or
ProtocolNegotiators.AbstractBufferingHandler.fail(ChannelHandlerContext, Throwable) is called. |
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 ProtocolNegotiator |
serverPlaintext()
Create a server plaintext handler for gRPC.
|
static ProtocolNegotiator |
serverTls(SslContext sslContext)
Create a server TLS handler for HTTP/2 capable of using ALPN/NPN.
|
static ProtocolNegotiator |
tls(SslContext sslContext,
String authority)
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 ProtocolNegotiator serverPlaintext()
public static ProtocolNegotiator serverTls(SslContext sslContext)
public static ProtocolNegotiator tls(SslContext sslContext, String authority)
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.