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 runningonResponse(java.util.Map<java.lang.String, java.lang.Object>)
when command's response arrives or there was an issue during invocation soonFailure(java.util.Map<java.lang.String, java.lang.Object>)
is run.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onFailure(java.util.Map<java.lang.String,java.lang.Object> response)
Whenever any issue occurs during command invocation it will be passed here as an instance ofThrowable
.void
onResponse(java.util.Map<java.lang.String,java.lang.Object> response)
When a command response arrive this method is invoked and it should contain continuation logic for the command.
-
-
-
Method Detail
-
onResponse
void onResponse(java.util.Map<java.lang.String,java.lang.Object> response)
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
void onFailure(java.util.Map<java.lang.String,java.lang.Object> response)
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.
-
-