java.lang.Object
io.helidon.webserver.http2.Http2Upgrader
- All Implemented Interfaces:
Http1Upgrader
HTTP/1.1 to HTTP/2 connection upgrade.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Http2Upgrader
create
(Http2Config config) Create a new HTTP2 upgrader.Expected value of the protocol upgrade, such ash2c
, orwebsocket
.upgrade
(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers) Upgrade connection.
-
Method Details
-
create
Create a new HTTP2 upgrader.- Parameters:
config
- HTTP/2 protocol configuration- Returns:
- a new upgrader
-
supportedProtocol
Description copied from interface:Http1Upgrader
Expected value of the protocol upgrade, such ash2c
, orwebsocket
. If an implementation supports multiple protocols, please implement this selector for each protocol- Specified by:
supportedProtocol
in interfaceHttp1Upgrader
- Returns:
- supported protocol
-
upgrade
public ServerConnection upgrade(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers) Description copied from interface:Http1Upgrader
Upgrade connection.- Specified by:
upgrade
in interfaceHttp1Upgrader
- Parameters:
ctx
- connection contextprologue
- http prologue of the upgrade requestheaders
- http headers of the upgrade request- Returns:
- a new connection to use instead of the original
Http1Connection
, ornull
if the connection cannot be upgraded
-