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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.netty.channel.ChannelHandlerclientTlsHandler(io.netty.channel.ChannelHandler next, io.netty.handler.ssl.SslContext sslContext, String authority, ChannelLogger negotiationLogger) static io.netty.channel.ChannelHandlerInternal version ofProtocolNegotiators.GrpcNegotiationHandler.Returns aProtocolNegotiatorfor plaintext client channel.Returns aProtocolNegotiatorfor plaintext server channel.serverTls(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiatorthat ensures the pipeline is set up so that TLS will be negotiated, the server TLShandleris added and writes to theChannelmay happen immediately, even before the TLS Handshake is complete.tls(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiatorthat 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.tls(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable) Returns aProtocolNegotiatorthat 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.static io.netty.channel.ChannelHandlerwaitUntilActiveHandler(io.netty.channel.ChannelHandler next, ChannelLogger negotiationLogger) Internal version ofProtocolNegotiators.WaitUntilActiveHandler.
-
Constructor Details
-
InternalProtocolNegotiators
private InternalProtocolNegotiators()
-
-
Method Details
-
tls
public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable) Returns aProtocolNegotiatorthat 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.- Parameters:
executorPool- a dedicatedExecutorpool for time-consuming TLS tasks
-
tls
public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiatorthat 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. -
serverTls
public static InternalProtocolNegotiator.ProtocolNegotiator serverTls(io.netty.handler.ssl.SslContext sslContext) Returns aProtocolNegotiatorthat ensures the pipeline is set up so that TLS will be negotiated, the server TLShandleris added and writes to theChannelmay happen immediately, even before the TLS Handshake is complete. -
plaintext
Returns aProtocolNegotiatorfor plaintext client channel. -
serverPlaintext
Returns aProtocolNegotiatorfor 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)
-