Class UpgradeToWebSocketLowLevel

All Implemented Interfaces:
Renderable, ToStringRenderable, WebSocketUpgrade, WebSocketUpgrade

public abstract class UpgradeToWebSocketLowLevel extends InternalCustomHeader implements WebSocketUpgrade
Currently internal API to handle FrameEvents directly.

INTERNAL API

  • Constructor Details

    • UpgradeToWebSocketLowLevel

      public UpgradeToWebSocketLowLevel()
  • Method Details

    • handleFrames

      public abstract HttpResponse handleFrames(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<FrameEvent,FrameEvent>,Object> handlerFlow, scala.Option<String> subprotocol)
      The low-level interface to create WebSocket server based on "frames". The user needs to handle control frames manually in this case.

      Returns a response to return in a request handler that will signal the low-level HTTP implementation to upgrade the connection to WebSocket and use the supplied handler to handle incoming WebSocket frames.

      INTERNAL API (for now)

      Parameters:
      handlerFlow - (undocumented)
      subprotocol - (undocumented)
      Returns:
      (undocumented)
    • handleFrames

      public HttpResponse handleFrames(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<FrameEvent,FrameEvent>,Object> handlerFlow, scala.Option<String> subprotocol, boolean compressionEnabled)
    • handleFrames

      public HttpResponse handleFrames(org.apache.pekko.stream.Graph<org.apache.pekko.stream.FlowShape<FrameEvent,FrameEvent>,Object> handlerFlow, scala.Option<String> subprotocol, boolean compressionEnabled, scala.Function1<FrameStart,Object> shouldCompress)
      The shouldCompress function is evaluated once for every outbound text or binary message when permessage-deflate was negotiated. The decision for the initial frame is retained for every continuation frame.
      Parameters:
      handlerFlow - (undocumented)
      subprotocol - (undocumented)
      compressionEnabled - (undocumented)
      shouldCompress - (undocumented)
      Returns:
      (undocumented)