public interface RPCManagerCompletionCallback
RPCManager.registerCallback()
, passing an implementation of this interface; its onSuccess() or onFailure() method will be called as appropriate when the RPCManager has completed processing of all its DSRequests, immediately before the response queue is marshalled and serialized, so any changes you make to responses will be reflected in what gets returned to the client. Your callback methods are passed a pointer to the controlling RPCManager. You can obtain the list of requests from RPCManager.getRequests()
, and you can obtain the response to a given request from RPCManager.getResponse(request)
- this will be null if no response has been created for that request (for example, if an exception has caused queue processing to be abandoned).
RPCManager
, DSRequest
Modifier and Type | Method and Description |
---|---|
void | onFailure(RPCManager rpc, boolean transactionFailed) Called when an RPCManager fails (ie, at least one of the requests it is managing fails). |
void | onSuccess(RPCManager rpc) Called when an RPCManager completes successfully |
void onSuccess(RPCManager rpc) throws java.lang.Exception
rpc
- The RPCManagerjava.lang.Exception
void onFailure(RPCManager rpc, boolean transactionFailed) throws java.lang.Exception
rpc
- The RPCManagertransactionFailed
- true if at least one failure happened in a request that was being managed by a user-provided or automatic transaction; otherwise falsejava.lang.Exception