Package io.grpc.netty
Class InternalProtocolNegotiators
- java.lang.Object
-
- io.grpc.netty.InternalProtocolNegotiators
-
public final class InternalProtocolNegotiators extends java.lang.ObjectInternal accessor forProtocolNegotiators.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInternalProtocolNegotiators.ProtocolNegotiationHandler
-
Constructor Summary
Constructors Modifier Constructor Description privateInternalProtocolNegotiators()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static io.netty.channel.ChannelHandlerclientTlsHandler(io.netty.channel.ChannelHandler next, io.netty.handler.ssl.SslContext sslContext, java.lang.String authority, ChannelLogger negotiationLogger)static io.netty.channel.ChannelHandlergrpcNegotiationHandler(GrpcHttp2ConnectionHandler next)Internal version ofProtocolNegotiators.GrpcNegotiationHandler.static InternalProtocolNegotiator.ProtocolNegotiatorplaintext()Returns aProtocolNegotiatorfor plaintext client channel.static InternalProtocolNegotiator.ProtocolNegotiatorserverPlaintext()Returns aProtocolNegotiatorfor plaintext server channel.static InternalProtocolNegotiator.ProtocolNegotiatorserverTls(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.static InternalProtocolNegotiator.ProtocolNegotiatortls(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.static InternalProtocolNegotiator.ProtocolNegotiatortls(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends java.util.concurrent.Executor> executorPool, java.util.Optional<java.lang.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.
-
-
-
Method Detail
-
tls
public static InternalProtocolNegotiator.ProtocolNegotiator tls(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends java.util.concurrent.Executor> executorPool, java.util.Optional<java.lang.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
public static InternalProtocolNegotiator.ProtocolNegotiator plaintext()
Returns aProtocolNegotiatorfor plaintext client channel.
-
serverPlaintext
public static InternalProtocolNegotiator.ProtocolNegotiator 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, java.lang.String authority, ChannelLogger negotiationLogger)
-
-