Package akka.http.scaladsl.model.ws
Class WebSocketCloseException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- akka.http.javadsl.model.ws.WebSocketCloseException
-
- akka.http.scaladsl.model.ws.WebSocketCloseException
-
- All Implemented Interfaces:
java.io.Serializable
public final class WebSocketCloseException extends WebSocketCloseException
Fail the outgoing message stream of a WebSocket handler with aWebSocketCloseExceptionto close the WebSocket with an application specific close code (3000-4999) and reason. The peer will see the close code and reason (in Akka HTTP as aPeerClosedConnectionException).Note that failing a stream may discard messages buffered in stages downstream of the failing stage. An ongoing streamed message is given the close timeout (3 seconds) to finish before the WebSocket is closed.
param: closeCode an application specific close code in the range 3000-4999 param: closeReason a reason, at most 123 bytes when UTF-8 encoded
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WebSocketCloseException(int closeCode)WebSocketCloseException(int closeCode, java.lang.String closeReason)
-
Method Summary
-
Methods inherited from class akka.http.javadsl.model.ws.WebSocketCloseException
closeCode, closeReason, create, create
-
-