java.lang.Object
io.helidon.webserver.websocket.WsUpgrader
io.helidon.microprofile.tyrus.TyrusUpgrader
- All Implemented Interfaces:
Http1RoutedUpgrader,Http1Upgrader
Tyrus connection upgrade provider.
-
Field Summary
Fields inherited from class io.helidon.webserver.websocket.WsUpgrader
EXTENSIONS, PROTOCOL, SUPPORTED_VERSION, SUPPORTED_VERSION_HEADER, SWITCHING_PROTOCOL_PREFIX, SWITCHING_PROTOCOLS_SUFFIX, WS_KEY, WS_VERSION -
Method Summary
Modifier and TypeMethodDescriptionstatic TyrusUpgraderCreate a new configured instance of Tyrus upgrader.origins()routedUpgrade(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers) Prepare an upgrade that should run through HTTP routing filters and route policies before the protocol switch is completed.upgrade(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers) Upgrade connection.Methods inherited from class io.helidon.webserver.websocket.WsUpgrader
anyOrigin, hash, isWebSocketUpgrade, supportedProtocol, validateOriginMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.webserver.http1.spi.Http1Upgrader
supportedProtocol
-
Method Details
-
create
Create a new configured instance of Tyrus upgrader.- Parameters:
config- configuration of WebSocket- Returns:
- a new HTTP/1 upgrader
-
upgrade
public ServerConnection upgrade(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers) Description copied from interface:Http1UpgraderUpgrade connection.- Specified by:
upgradein interfaceHttp1Upgrader- Overrides:
upgradein classWsUpgrader- 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, ornullif the connection cannot be upgraded
-
routedUpgrade
public Optional<Http1RoutedUpgrade> routedUpgrade(ConnectionContext ctx, HttpPrologue prologue, WritableHeaders<?> headers) Description copied from interface:Http1RoutedUpgraderPrepare an upgrade that should run through HTTP routing filters and route policies before the protocol switch is completed.- Specified by:
routedUpgradein interfaceHttp1RoutedUpgrader- Parameters:
ctx- connection contextprologue- http prologue of the upgrade requestheaders- http headers of the upgrade request- Returns:
- prepared routed upgrade, or an empty optional to continue with ordinary HTTP routing
-
origins
- Overrides:
originsin classWsUpgrader
-