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 |
onComplete()
Will be called when all messages are received.
|
void |
onError(Exception e)
Will be called when an Exception occurs.
|
abstract void |
onEvent(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 status.public abstract void onEvent(T message)
message - The message body in a structured class.public void onComplete()
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.