Package io.helidon.webserver.websocket
Class WebsocketUpgradeCodecProvider
java.lang.Object
io.helidon.webserver.websocket.WebsocketUpgradeCodecProvider
- All Implemented Interfaces:
UpgradeCodecProvider
Service providing WebSocket upgrade codec for Helidon webserver.
-
Constructor Summary
ConstructorDescriptionDeprecated.Only intended for service loader, do not instantiate -
Method Summary
Modifier and TypeMethodDescriptionName of the protocol expected inUpgrade
header during HTTP upgrade request for using decoder provided by this supplier.Name of the protocol expected by ALPN negotiation for using this protocol, prior-knowledge decoder is expected to be used.io.netty.handler.codec.http.HttpServerUpgradeHandler.UpgradeCodec
upgradeCodec
(io.netty.handler.codec.http.HttpServerCodec httpServerCodec, Router router, int maxContentLength) Codec used by theHttpServerUpgradeHandler
whenclearTextProtocol()
matches.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.webserver.spi.UpgradeCodecProvider
priorKnowledgeDecoder
-
Constructor Details
-
WebsocketUpgradeCodecProvider
Deprecated.Only intended for service loader, do not instantiateCreates a newWebsocketUpgradeCodecProvider
.
-
-
Method Details
-
clearTextProtocol
Description copied from interface:UpgradeCodecProvider
Name of the protocol expected inUpgrade
header during HTTP upgrade request for using decoder provided by this supplier.- Specified by:
clearTextProtocol
in interfaceUpgradeCodecProvider
- Returns:
- protocol name
-
tlsProtocol
Description copied from interface:UpgradeCodecProvider
Name of the protocol expected by ALPN negotiation for using this protocol, prior-knowledge decoder is expected to be used.- Specified by:
tlsProtocol
in interfaceUpgradeCodecProvider
- Returns:
- name of the protocol supported by ALPN or empty optional
-
upgradeCodec
public io.netty.handler.codec.http.HttpServerUpgradeHandler.UpgradeCodec upgradeCodec(io.netty.handler.codec.http.HttpServerCodec httpServerCodec, Router router, int maxContentLength) Description copied from interface:UpgradeCodecProvider
Codec used by theHttpServerUpgradeHandler
whenclearTextProtocol()
matches.- Specified by:
upgradeCodec
in interfaceUpgradeCodecProvider
- Parameters:
httpServerCodec
- For replacing HttpResponseEncoder and HttpRequestDecoder when usingHttpServerUpgradeHandler
router
- set of all configured routingsmaxContentLength
- maximum length of the content of an upgrade request- Returns:
- upgrade codec
-