Class WebSocket

java.lang.Object
akka.http.impl.engine.ws.WebSocket

public class WebSocket extends Object
INTERNAL API

Defines components of the websocket stack.

  • Constructor Details

    • WebSocket

      public WebSocket()
  • Method Details

    • stack

      public static akka.stream.scaladsl.BidiFlow<FrameEvent,Message,Message,FrameEvent,akka.NotUsed> stack(boolean serverSide, WebSocketSettings websocketSettings, scala.concurrent.duration.FiniteDuration closeTimeout, akka.event.LoggingAdapter log)
      A stack of all the higher WS layers between raw frames and the user API.
      Parameters:
      serverSide - (undocumented)
      websocketSettings - (undocumented)
      closeTimeout - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • framing

      public static akka.stream.scaladsl.BidiFlow<akka.util.ByteString,FrameEvent,FrameEvent,akka.util.ByteString,akka.NotUsed> framing()
      The lowest layer that implements the binary protocol
    • masking

      public static akka.stream.scaladsl.BidiFlow<FrameEvent,FrameEventOrError,FrameEvent,FrameEvent,akka.NotUsed> masking(boolean serverSide, scala.Function0<Random> maskingRandomFactory)
      The layer that handles masking using the rules defined in the specification
    • periodicKeepAlive

      public static akka.stream.scaladsl.BidiFlow<FrameHandler.Output,FrameHandler.Output,Object,Object,akka.NotUsed> periodicKeepAlive(WebSocketSettings settings)
      The layer that transparently injects (if enabled) keepAlive Ping or Pong messages when connection is idle
    • frameHandling

      public static akka.stream.scaladsl.BidiFlow<FrameEventOrError,FrameHandler.Output,Object,FrameStart,akka.NotUsed> frameHandling(boolean serverSide, scala.concurrent.duration.FiniteDuration closeTimeout, akka.event.LoggingAdapter log)
      The layer that implements all low-level frame handling, like handling control frames, collecting messages from frames, decoding text messages, close handling, etc.
      Parameters:
      serverSide - (undocumented)
      closeTimeout - (undocumented)
      log - (undocumented)
      Returns:
      (undocumented)
    • messageAPI

      public static akka.stream.scaladsl.BidiFlow<FrameHandler.Output,Message,Message,Object,akka.NotUsed> messageAPI(boolean serverSide, scala.concurrent.duration.FiniteDuration closeTimeout)
      The layer that provides the high-level user facing API on top of frame handling.
      Parameters:
      serverSide - (undocumented)
      closeTimeout - (undocumented)
      Returns:
      (undocumented)