Class Http2Upgrader

java.lang.Object
io.helidon.webserver.http2.Http2Upgrader
All Implemented Interfaces:
Http1Upgrader

public class Http2Upgrader extends Object implements Http1Upgrader
HTTP/1.1 to HTTP/2 connection upgrade.
  • Method Details

    • create

      public static Http2Upgrader create(Http2Config config)
      Create a new HTTP2 upgrader.
      Parameters:
      config - HTTP/2 protocol configuration
      Returns:
      a new upgrader
    • supportedProtocol

      public String supportedProtocol()
      Description copied from interface: Http1Upgrader
      Expected value of the protocol upgrade, such as h2c, or websocket. If an implementation supports multiple protocols, please implement this selector for each protocol
      Specified by:
      supportedProtocol in interface Http1Upgrader
      Returns:
      supported protocol
    • upgrade

      public ServerConnection upgrade(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers)
      Description copied from interface: Http1Upgrader
      Upgrade connection.
      Specified by:
      upgrade in interface Http1Upgrader
      Parameters:
      ctx - connection context
      prologue - http prologue of the upgrade request
      headers - http headers of the upgrade request
      Returns:
      a new connection to use instead of the original Http1Connection, or null if the connection cannot be upgraded