Class InternalProtocolNegotiator.ProtocolNegotiatorAdapter
java.lang.Object
io.grpc.netty.InternalProtocolNegotiator.ProtocolNegotiatorAdapter
- All Implemented Interfaces:
InternalProtocolNegotiator.ProtocolNegotiator, ProtocolNegotiator
- Enclosing class:
InternalProtocolNegotiator
static final class InternalProtocolNegotiator.ProtocolNegotiatorAdapter
extends Object
implements InternalProtocolNegotiator.ProtocolNegotiator
-
Nested Class Summary
Nested classes/interfaces inherited from interface ProtocolNegotiator
ProtocolNegotiator.ClientFactory, ProtocolNegotiator.ServerFactory -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases resources held by this negotiator.io.netty.channel.ChannelHandlernewHandler(GrpcHttp2ConnectionHandler grpcHandler) Creates a new handler to control the protocol negotiation.io.netty.util.AsciiStringscheme()The HTTP/2 scheme to be used when sendingHEADERS.
-
Field Details
-
negotiator
-
-
Constructor Details
-
ProtocolNegotiatorAdapter
-
-
Method Details
-
scheme
public io.netty.util.AsciiString scheme()Description copied from interface:ProtocolNegotiatorThe HTTP/2 scheme to be used when sendingHEADERS.- Specified by:
schemein interfaceProtocolNegotiator
-
newHandler
Description copied from interface:ProtocolNegotiatorCreates 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:
newHandlerin interfaceProtocolNegotiator
-
close
public void close()Description copied from interface:ProtocolNegotiatorReleases 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(GrpcHttp2ConnectionHandler)can outlive their parent negotiator on server-side, but not on client-side.- Specified by:
closein interfaceProtocolNegotiator
-