public abstract class WebSocketRuntimeException
extends org.mule.runtime.api.exception.MuleRuntimeException
RuntimeException implementations that refer to a specific WebSocket.
Because WebSocket is not Serializable, it is not guaranteed that the referred socket will always be available,
reason why the getWebSocket() method returns an Optional. It will always be possible however to recover the
socket's ID.
| Modifier and Type | Field and Description |
|---|---|
protected WebSocket |
webSocket |
protected String |
webSocketId |
| Constructor and Description |
|---|
WebSocketRuntimeException(String message,
WebSocket webSocket)
Creates a new instance
|
WebSocketRuntimeException(String message,
WebSocket webSocket,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
Optional<WebSocket> |
getWebSocket()
Optionally returns the referred
WebSocket. |
String |
getWebSocketId() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringprotected final String webSocketId
protected transient WebSocket webSocket
public WebSocketRuntimeException(String message, WebSocket webSocket)
message - the exception messagewebSocket - the referred WebSocketCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.