public abstract class RpcResponseHandler<T>
extends java.lang.Object
| Constructor and Description |
|---|
RpcResponseHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
checkResponse(RpcRequest request)
This is implemented in all concrete subclasses to check responses for
validity, and throws an IOException if the response indicates that the
request failed.
|
T |
getNewResponse()
Create a new response and return it.
|
T |
getResponse()
Get the current response.
|
protected abstract T |
makeNewResponse()
This is implemented in all concrete subclasses, so that the new response
can be created using any available parameters.
|
public T getResponse()
public T getNewResponse()
protected abstract T makeNewResponse()
public abstract void checkResponse(RpcRequest request) throws java.io.IOException
request - This is used for error messages, to aid debugging, since the
response will likely not have enough data to determine the
request that caused it.java.io.IOException