Class Http2ServerUpgradeCodec

java.lang.Object
io.netty.handler.codec.http2.Http2ServerUpgradeCodec
All Implemented Interfaces:
HttpServerUpgradeHandler.UpgradeCodec

public class Http2ServerUpgradeCodec extends java.lang.Object implements HttpServerUpgradeHandler.UpgradeCodec
Server-side codec for performing a cleartext upgrade from HTTP/1.x to HTTP/2.
  • Field Details

    • logger

      private static final InternalLogger logger
    • REQUIRED_UPGRADE_HEADERS

      private static final java.util.List<java.lang.CharSequence> REQUIRED_UPGRADE_HEADERS
    • EMPTY_HANDLERS

      private static final ChannelHandler[] EMPTY_HANDLERS
    • handlerName

      private final java.lang.String handlerName
    • connectionHandler

      private final Http2ConnectionHandler connectionHandler
    • handlers

      private final ChannelHandler[] handlers
    • frameReader

      private final Http2FrameReader frameReader
    • settings

      private Http2Settings settings
  • Constructor Details

    • Http2ServerUpgradeCodec

      public Http2ServerUpgradeCodec(Http2ConnectionHandler connectionHandler)
      Creates the codec using a default name for the connection handler when adding to the pipeline.
      Parameters:
      connectionHandler - the HTTP/2 connection handler
    • Http2ServerUpgradeCodec

      public Http2ServerUpgradeCodec(Http2MultiplexCodec http2Codec)
      Creates the codec using a default name for the connection handler when adding to the pipeline.
      Parameters:
      http2Codec - the HTTP/2 multiplexing handler.
    • Http2ServerUpgradeCodec

      public Http2ServerUpgradeCodec(java.lang.String handlerName, Http2ConnectionHandler connectionHandler)
      Creates the codec providing an upgrade to the given handler for HTTP/2.
      Parameters:
      handlerName - the name of the HTTP/2 connection handler to be used in the pipeline, or null to auto-generate the name
      connectionHandler - the HTTP/2 connection handler
    • Http2ServerUpgradeCodec

      public Http2ServerUpgradeCodec(java.lang.String handlerName, Http2MultiplexCodec http2Codec)
      Creates the codec providing an upgrade to the given handler for HTTP/2.
      Parameters:
      handlerName - the name of the HTTP/2 connection handler to be used in the pipeline.
      http2Codec - the HTTP/2 multiplexing handler.
    • Http2ServerUpgradeCodec

      public Http2ServerUpgradeCodec(Http2FrameCodec http2Codec, ChannelHandler... handlers)
      Creates the codec using a default name for the connection handler when adding to the pipeline.
      Parameters:
      http2Codec - the HTTP/2 frame handler.
      handlers - the handlers that will handle the Http2Frames.
    • Http2ServerUpgradeCodec

      public Http2ServerUpgradeCodec(java.lang.String handlerName, Http2ConnectionHandler connectionHandler, ChannelHandler... handlers)
  • Method Details