Class WebSocket$
java.lang.Object
org.apache.pekko.http.impl.engine.ws.WebSocket$
INTERNAL API
Defines components of the websocket stack.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final WebSocket$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.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.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 protocolorg.apache.pekko.stream.scaladsl.BidiFlow<FrameEventOrError,FrameEventOrError, FrameEvent, FrameEvent, org.apache.pekko.NotUsed> idleTimeout(WebSocketSettings settings) The layer that transparently monitors frames in both directions and fails the flow with aWebSocketIdleTimeoutExceptionif no frame is passed within the configured time.org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,FrameEventOrError, FrameEvent, FrameEvent, org.apache.pekko.NotUsed> The layer that handles masking using the rules defined in the specificationorg.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.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 idleorg.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message, Message, FrameEvent, org.apache.pekko.NotUsed> stack(boolean serverSide, WebSocketSettings websocketSettings, scala.Option<PerMessageDeflate.Negotiated> perMessageDeflate, org.apache.pekko.event.LoggingAdapter log, scala.Function1<Message, Object> shouldCompress) org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message, Message, FrameEvent, org.apache.pekko.NotUsed> stack(boolean serverSide, WebSocketSettings websocketSettings, scala.Option<PerMessageDeflate.Negotiated> perMessageDeflate, 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.org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message, Message, FrameEvent, org.apache.pekko.NotUsed> stack(boolean serverSide, WebSocketSettings websocketSettings, scala.Option<PerMessageDeflate.Negotiated> perMessageDeflate, scala.concurrent.duration.FiniteDuration closeTimeout, org.apache.pekko.event.LoggingAdapter log, scala.Function1<Message, Object> shouldCompress)
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
WebSocket$
public WebSocket$()
-
-
Method Details
-
stack
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message, stackMessage, FrameEvent, org.apache.pekko.NotUsed> (boolean serverSide, WebSocketSettings websocketSettings, scala.Option<PerMessageDeflate.Negotiated> perMessageDeflate, 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)perMessageDeflate- (undocumented)closeTimeout- (undocumented)log- (undocumented)- Returns:
- (undocumented)
-
stack
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message, stackMessage, FrameEvent, org.apache.pekko.NotUsed> (boolean serverSide, WebSocketSettings websocketSettings, scala.Option<PerMessageDeflate.Negotiated> perMessageDeflate, org.apache.pekko.event.LoggingAdapter log, scala.Function1<Message, Object> shouldCompress) -
stack
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,Message, stackMessage, FrameEvent, org.apache.pekko.NotUsed> (boolean serverSide, WebSocketSettings websocketSettings, scala.Option<PerMessageDeflate.Negotiated> perMessageDeflate, scala.concurrent.duration.FiniteDuration closeTimeout, org.apache.pekko.event.LoggingAdapter log, scala.Function1<Message, Object> shouldCompress) -
framing
public org.apache.pekko.stream.scaladsl.BidiFlow<org.apache.pekko.util.ByteString,FrameEvent, framing()FrameEvent, org.apache.pekko.util.ByteString, org.apache.pekko.NotUsed> The lowest layer that implements the binary protocol -
masking
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameEvent,FrameEventOrError, maskingFrameEvent, FrameEvent, org.apache.pekko.NotUsed> (boolean serverSide, scala.Function0<Random> maskingRandomFactory) The layer that handles masking using the rules defined in the specification -
idleTimeout
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameEventOrError,FrameEventOrError, idleTimeoutFrameEvent, FrameEvent, org.apache.pekko.NotUsed> (WebSocketSettings settings) The layer that transparently monitors frames in both directions and fails the flow with aWebSocketIdleTimeoutExceptionif no frame is passed within the configured time.It sits below frame handling, so that control frames (e.g. a Pong replying to a keep-alive Ping) count as activity.
- Parameters:
settings- (undocumented)- Returns:
- (undocumented)
-
periodicKeepAlive
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameHandler.Output,FrameHandler.Output, periodicKeepAliveObject, Object, org.apache.pekko.NotUsed> (WebSocketSettings settings) The layer that transparently injects (if enabled) keepAlive Ping or Pong messages when connection is idle -
frameHandling
public org.apache.pekko.stream.scaladsl.BidiFlow<FrameEventOrError,FrameHandler.Output, frameHandlingObject, FrameStart, org.apache.pekko.NotUsed> (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 org.apache.pekko.stream.scaladsl.BidiFlow<FrameHandler.Output,Message, messageAPIMessage, Object, org.apache.pekko.NotUsed> (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)
-