Class WebSocket

java.lang.Object
org.apache.pekko.http.impl.engine.ws.WebSocket

public class WebSocket extends Object
INTERNAL API

Defines components of the websocket stack.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.pekko.stream.scaladsl.BidiFlow<FrameEventOrError,FrameHandler.Output,Object,FrameStart,org.apache.pekko.NotUsed>
    frameHandling(boolean serverSide, scala.concurrent.duration.FiniteDuration closeTimeout, org.apache.pekko.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.
    static org.apache.pekko.stream.scaladsl.BidiFlow<org.apache.pekko.util.ByteString,FrameEvent,FrameEvent,org.apache.pekko.util.ByteString,org.apache.pekko.NotUsed>
    The lowest layer that implements the binary protocol
    static org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,FrameEventOrError,FrameEvent,FrameEvent,org.apache.pekko.NotUsed>
    masking(boolean serverSide, scala.Function0<Random> maskingRandomFactory)
    The layer that handles masking using the rules defined in the specification
    static org.apache.pekko.stream.scaladsl.BidiFlow<FrameHandler.Output,Message,Message,Object,org.apache.pekko.NotUsed>
    messageAPI(boolean serverSide, scala.concurrent.duration.FiniteDuration closeTimeout)
    The layer that provides the high-level user facing API on top of frame handling.
    static org.apache.pekko.stream.scaladsl.BidiFlow<FrameHandler.Output,FrameHandler.Output,Object,Object,org.apache.pekko.NotUsed>
    The layer that transparently injects (if enabled) keepAlive Ping or Pong messages when connection is idle
    static org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message,Message,FrameEvent,org.apache.pekko.NotUsed>
    stack(boolean serverSide, WebSocketSettings websocketSettings, scala.concurrent.duration.FiniteDuration closeTimeout, org.apache.pekko.event.LoggingAdapter log)
    A stack of all the higher WS layers between raw frames and the user API.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebSocket

      public WebSocket()
  • Method Details

    • stack

      public static org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message,Message,FrameEvent,org.apache.pekko.NotUsed> stack(boolean serverSide, WebSocketSettings websocketSettings, scala.concurrent.duration.FiniteDuration closeTimeout, org.apache.pekko.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 org.apache.pekko.stream.scaladsl.BidiFlow<org.apache.pekko.util.ByteString,FrameEvent,FrameEvent,org.apache.pekko.util.ByteString,org.apache.pekko.NotUsed> framing()
      The lowest layer that implements the binary protocol
    • masking

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

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

      public static org.apache.pekko.stream.scaladsl.BidiFlow<FrameEventOrError,FrameHandler.Output,Object,FrameStart,org.apache.pekko.NotUsed> frameHandling(boolean serverSide, scala.concurrent.duration.FiniteDuration closeTimeout, org.apache.pekko.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 org.apache.pekko.stream.scaladsl.BidiFlow<FrameHandler.Output,Message,Message,Object,org.apache.pekko.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)