Package org.ovirt.vdsm.jsonrpc.client
Interface BrokerCommandCallback
public interface BrokerCommandCallback
This interface provides a way to pass a logic which is run
after the specific command was invoked. The logic is invoked
by running
onResponse(java.util.Map<java.lang.String, java.lang.Object>) when command's response arrives
or there was an issue during invocation so onFailure(java.util.Map<java.lang.String, java.lang.Object>) is
run.-
Method Summary
Modifier and TypeMethodDescriptionvoidWhenever any issue occurs during command invocation it will be passed here as an instance ofThrowable.voidonResponse(Map<String, Object> response) When a command response arrive this method is invoked and it should contain continuation logic for the command.
-
Method Details
-
onResponse
When a command response arrive this method is invoked and it should contain continuation logic for the command.- Parameters:
response- - Map containing response where we optionally provide status key. It is provided when an an issue occurred on the server side.
-
onFailure
Whenever any issue occurs during command invocation it will be passed here as an instance ofThrowable.- Parameters:
response- - Map containing error response where we optionally provide status key. It is provided when an issue occurred on the server side.
-