Package io.grpc.netty

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
  • Field Details

  • Constructor Details

    • ProtocolNegotiatorAdapter

      public ProtocolNegotiatorAdapter(ProtocolNegotiator negotiator)
  • Method Details

    • scheme

      public io.netty.util.AsciiString scheme()
      Description copied from interface: ProtocolNegotiator
      The HTTP/2 scheme to be used when sending HEADERS.
      Specified by:
      scheme in interface ProtocolNegotiator
    • newHandler

      public io.netty.channel.ChannelHandler newHandler(GrpcHttp2ConnectionHandler grpcHandler)
      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 call grpcHandler.onHandleProtocolNegotiationCompleted() at certain point if the negotiation has completed successfully.
      Specified by:
      newHandler in interface ProtocolNegotiator
    • 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 by ProtocolNegotiator.newHandler(io.grpc.netty.GrpcHttp2ConnectionHandler) can outlive their parent negotiator on server-side, but not on client-side.
      Specified by:
      close in interface ProtocolNegotiator