public interface WebSocketCallback
WebSocket events.
Implementations MUST be thread safe
| Modifier and Type | Method and Description |
|---|---|
void |
onClose(WebSocket webSocket,
WebSocketCloseCode code,
String reason)
Invoked then the given
webSocket is closed. |
void |
onConnect(WebSocket webSocket)
Invoked when the
webSocket has been established |
void |
onMessage(WebSocket webSocket,
org.mule.runtime.api.metadata.TypedValue<InputStream> content)
Invoked when the given
webSocket receives data. |
void onConnect(WebSocket webSocket)
webSocket has been establishedwebSocket - the created WebSocketvoid onClose(WebSocket webSocket, WebSocketCloseCode code, String reason)
webSocket is closed. This method will be invoked whether the socket was closed locally or
remotely.webSocket - the closed WebSocketcode - the close code usedreason - the reason providedvoid onMessage(WebSocket webSocket, org.mule.runtime.api.metadata.TypedValue<InputStream> content)
webSocket receives data.webSocket - the WebSocket that received the datacontent - the received contentCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.