public static interface WebSocket.Listener
onError(WebSocket, Throwable)| Modifier and Type | Method and Description |
|---|---|
default void |
onClose(WebSocket webSocket,
int code,
String reason)
Called when the remote input closes.
|
default void |
onError(WebSocket webSocket,
Throwable error)
Called when an error has occurred.
|
default void |
onMessage(WebSocket webSocket,
ByteBuffer bytes)
Called once the full binary message has been built.
|
default void |
onMessage(WebSocket webSocket,
String text)
Called once the full text message has been built.
|
default void |
onOpen(WebSocket webSocket) |
default void onOpen(WebSocket webSocket)
default void onMessage(WebSocket webSocket, String text)
WebSocket.request() must
be called to receive more messages.default void onMessage(WebSocket webSocket, ByteBuffer bytes)
WebSocket.request() must
be called to receive more messages.default void onClose(WebSocket webSocket, int code, String reason)
WebSocket.request()
do nothing after this. Some HttpClient implementations will require WebSocket.request()
to be called to calling onClose.default void onError(WebSocket webSocket, Throwable error)
WebSocket.request()
do nothing after this.Copyright © 2015–2023 Red Hat. All rights reserved.