Class WebsocketUpgradeCodecProvider

java.lang.Object
io.helidon.webserver.websocket.WebsocketUpgradeCodecProvider
All Implemented Interfaces:
UpgradeCodecProvider

public class WebsocketUpgradeCodecProvider extends Object implements UpgradeCodecProvider
Service providing WebSocket upgrade codec for Helidon webserver.
  • Constructor Details

  • Method Details

    • clearTextProtocol

      public CharSequence clearTextProtocol()
      Description copied from interface: UpgradeCodecProvider
      Name of the protocol expected in Upgrade header during HTTP upgrade request for using decoder provided by this supplier.
      Specified by:
      clearTextProtocol in interface UpgradeCodecProvider
      Returns:
      protocol name
    • tlsProtocol

      public Optional<String> 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 interface UpgradeCodecProvider
      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 the HttpServerUpgradeHandler when clearTextProtocol() matches.
      Specified by:
      upgradeCodec in interface UpgradeCodecProvider
      Parameters:
      httpServerCodec - For replacing HttpResponseEncoder and HttpRequestDecoder when using HttpServerUpgradeHandler
      router - set of all configured routings
      maxContentLength - maximum length of the content of an upgrade request
      Returns:
      upgrade codec