Package io.grpc.netty
Interface ProtocolNegotiator
-
- All Known Subinterfaces:
InternalProtocolNegotiator.ProtocolNegotiator
- All Known Implementing Classes:
InternalProtocolNegotiator.ProtocolNegotiatorAdapter,ProtocolNegotiators.ClientTlsProtocolNegotiator,ProtocolNegotiators.PlaintextProtocolNegotiator,ProtocolNegotiators.PlaintextUpgradeProtocolNegotiator
interface ProtocolNegotiatorAn class that provides a Netty handler to control protocol negotiation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceProtocolNegotiator.ClientFactorystatic interfaceProtocolNegotiator.ServerFactory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()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.
-
-
-
Method Detail
-
scheme
io.netty.util.AsciiString scheme()
The HTTP/2 scheme to be used when sendingHEADERS.
-
newHandler
io.netty.channel.ChannelHandler newHandler(GrpcHttp2ConnectionHandler grpcHandler)
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.
-
close
void close()
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 bynewHandler(io.grpc.netty.GrpcHttp2ConnectionHandler)can outlive their parent negotiator on server-side, but not on client-side.
-
-