public abstract class ResultCallback<T> extends Object
| Constructor and Description |
|---|
ResultCallback() |
| Modifier and Type | Method and Description |
|---|---|
void |
doClose(Status status)
Will be called when the server is on closing, only support the websocket protocol.
|
void |
onClose(Status status)
Will be called as soon as the server closed, only support the websocket protocol.
|
void |
onError(Exception e)
Will be called when an Exception occurs.
|
abstract void |
onEvent(String eventType,
T message)
Will be called as soon as the server replies
|
void |
onOpen(Status status)
Will be called as soon as the connection is established, only support the websocket protocol.
|
public void onOpen(Status status)
status - The connection status.public abstract void onEvent(String eventType, T message)
eventType - The message type. Please check `EventType` for details.message - The message body in a structured class.public void onClose(Status status)
status - The connection status.public void onError(Exception e)
e - The exception instance.public void doClose(Status status)
status - The connection status.Copyright © 2023. All rights reserved.