Package io.grpc.netty
Class InternalProtocolNegotiators
java.lang.Object
io.grpc.netty.InternalProtocolNegotiators
Internal accessor for
ProtocolNegotiators
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
-
Method Summary
Modifier and TypeMethodDescriptionstatic io.netty.channel.ChannelHandler
clientTlsHandler
(io.netty.channel.ChannelHandler next, io.netty.handler.ssl.SslContext sslContext, String authority, ChannelLogger negotiationLogger) static io.netty.channel.ChannelHandler
Internal version ofProtocolNegotiators.GrpcNegotiationHandler
.Returns aProtocolNegotiator
for plaintext client channel.Returns aProtocolNegotiator
for plaintext server channel.serverTls
(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiator
that ensures the pipeline is set up so that TLS will be negotiated, the server TLShandler
is added and writes to theChannel
may happen immediately, even before the TLS Handshake is complete.tls
(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiator
that ensures the pipeline is set up so that TLS will be negotiated, thehandler
is added and writes to theChannel
may happen immediately, even before the TLS Handshake is complete.tls
(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable) Returns aProtocolNegotiator
that ensures the pipeline is set up so that TLS will be negotiated, thehandler
is added and writes to theChannel
may happen immediately, even before the TLS Handshake is complete.static io.netty.channel.ChannelHandler
waitUntilActiveHandler
(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger) Internal version ofProtocolNegotiators.WaitUntilActiveHandler
.
-
Method Details
-
tls
public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable) Returns aProtocolNegotiator
that ensures the pipeline is set up so that TLS will be negotiated, thehandler
is added and writes to theChannel
may happen immediately, even before the TLS Handshake is complete.- Parameters:
executorPool
- a dedicatedExecutor
pool for time-consuming TLS tasks
-
tls
public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiator
that ensures the pipeline is set up so that TLS will be negotiated, thehandler
is added and writes to theChannel
may happen immediately, even before the TLS Handshake is complete. -
serverTls
public static InternalProtocolNegotiator.ProtocolNegotiator serverTls(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiator
that ensures the pipeline is set up so that TLS will be negotiated, the server TLShandler
is added and writes to theChannel
may happen immediately, even before the TLS Handshake is complete. -
plaintext
Returns aProtocolNegotiator
for plaintext client channel. -
serverPlaintext
Returns aProtocolNegotiator
for plaintext server channel. -
waitUntilActiveHandler
public static io.netty.channel.ChannelHandler waitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger) Internal version ofProtocolNegotiators.WaitUntilActiveHandler
. -
grpcNegotiationHandler
public static io.netty.channel.ChannelHandler grpcNegotiationHandler(GrpcHttp2ConnectionHandler next) Internal version ofProtocolNegotiators.GrpcNegotiationHandler
. -
clientTlsHandler
public static io.netty.channel.ChannelHandler clientTlsHandler(io.netty.channel.ChannelHandler next, io.netty.handler.ssl.SslContext sslContext, String authority, ChannelLogger negotiationLogger)
-