abstract class ResponseCallback extends java.lang.Object implements SingleResultCallback<ResponseBuffers>
Modifier and Type | Field and Description |
---|---|
private boolean |
closed |
private long |
requestId |
private ServerAddress |
serverAddress |
Constructor and Description |
---|
ResponseCallback(long requestId,
ServerAddress serverAddress) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
callCallback(ResponseBuffers responseBuffers,
java.lang.Throwable t) |
protected long |
getRequestId() |
protected ServerAddress |
getServerAddress() |
void |
onResult(ResponseBuffers responseBuffers,
java.lang.Throwable t)
Called when the operation completes.
|
private volatile boolean closed
private final ServerAddress serverAddress
private final long requestId
ResponseCallback(long requestId, ServerAddress serverAddress)
protected ServerAddress getServerAddress()
protected long getRequestId()
public void onResult(ResponseBuffers responseBuffers, java.lang.Throwable t)
SingleResultCallback
onResult
in interface SingleResultCallback<ResponseBuffers>
responseBuffers
- the result, which may be null. Always null if e is not null.t
- the throwable, or null if the operation completed normallyprotected abstract void callCallback(ResponseBuffers responseBuffers, java.lang.Throwable t)