Q
- the request classR
- the response classpublic interface QueryCallback<Q extends RpcRequest<R>,R extends RpcResponse>
Modifier and Type | Method | Description |
---|---|---|
void |
onFailure(IOException ex,
Q request) |
This method is called when an exception occurs with the connection to the node.
|
void |
onFailure(RpcException ex,
Q request) |
This method is called when there is an error with the request data, returned response data, or the node.
|
void |
onResponse(R response,
Q request) |
This method is called when the request was successful and the node has returned a valid response.
|
void onResponse(R response, Q request)
response
- the response returned from the RPC noderequest
- the request which resulted in this responsevoid onFailure(RpcException ex, Q request)
instanceof
check) to determine the detailed cause of the exception.ex
- the exception thrownrequest
- the attempted request which triggered this exceptionvoid onFailure(IOException ex, Q request)
ex
- the exception thrownrequest
- the attempted request which triggered this exceptionCopyright © 2020. All rights reserved.