Class RpcResponseHandler<T>
java.lang.Object
com.emc.ecs.nfsclient.rpc.RpcResponseHandler<T>
- Direct Known Subclasses:
NfsResponseHandler
This class allows users to specify how new response instances are created during repeated RPC
calls, and how responses are validated before their data is used.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidcheckResponse(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.Create a new response and return it.Get the current response.protected abstract TThis is implemented in all concrete subclasses, so that the new response can be created using any available parameters.
-
Constructor Details
-
RpcResponseHandler
public RpcResponseHandler()
-
-
Method Details
-
getResponse
-
getNewResponse
-
makeNewResponse
This is implemented in all concrete subclasses, so that the new response can be created using any available parameters.- Returns:
- the new response.
-
checkResponse
This is implemented in all concrete subclasses to check responses for validity, and throws an IOException if the response indicates that the request failed.- Parameters:
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.- Throws:
IOException
-