Package io.grpc.netty
Class ProtocolNegotiators.ClientTlsProtocolNegotiator
java.lang.Object
io.grpc.netty.ProtocolNegotiators.ClientTlsProtocolNegotiator
- All Implemented Interfaces:
ProtocolNegotiator
- Enclosing class:
ProtocolNegotiators
static final class ProtocolNegotiators.ClientTlsProtocolNegotiator
extends Object
implements ProtocolNegotiator
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.grpc.netty.ProtocolNegotiator
ProtocolNegotiator.ClientFactory, ProtocolNegotiator.ServerFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Executor
private final ObjectPool
<? extends Executor> private final io.netty.handler.ssl.SslContext
-
Constructor Summary
ConstructorsConstructorDescriptionClientTlsProtocolNegotiator
(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Releases resources held by this negotiator.io.netty.channel.ChannelHandler
newHandler
(GrpcHttp2ConnectionHandler grpcHandler) Creates a new handler to control the protocol negotiation.io.netty.util.AsciiString
scheme()
The HTTP/2 scheme to be used when sendingHEADERS
.
-
Field Details
-
sslContext
private final io.netty.handler.ssl.SslContext sslContext -
executorPool
-
handshakeCompleteRunnable
-
executor
-
-
Constructor Details
-
ClientTlsProtocolNegotiator
public ClientTlsProtocolNegotiator(io.netty.handler.ssl.SslContext sslContext, ObjectPool<? extends Executor> executorPool, Optional<Runnable> handshakeCompleteRunnable)
-
-
Method Details
-
scheme
public io.netty.util.AsciiString scheme()Description copied from interface:ProtocolNegotiator
The HTTP/2 scheme to be used when sendingHEADERS
.- Specified by:
scheme
in interfaceProtocolNegotiator
-
newHandler
Description copied from interface:ProtocolNegotiator
Creates a new handler to control the protocol negotiation. Once the negotiation has completed successfully, the provided handler is installed. Must callgrpcHandler.onHandleProtocolNegotiationCompleted()
at certain point if the negotiation has completed successfully.- Specified by:
newHandler
in interfaceProtocolNegotiator
-
close
public void close()Description copied from interface:ProtocolNegotiator
Releases resources held by this negotiator. Called when the Channel transitions to terminated or when InternalServer is shutdown (depending on client or server). That means handlers returned byProtocolNegotiator.newHandler(io.grpc.netty.GrpcHttp2ConnectionHandler)
can outlive their parent negotiator on server-side, but not on client-side.- Specified by:
close
in interfaceProtocolNegotiator
-