public class BatchCall extends Object implements Future<List<JsonRpcResponse>>, JsonRpcCall
| Constructor and Description |
|---|
BatchCall(List<JsonRpcRequest> requests) |
BatchCall(List<JsonRpcRequest> requests,
BrokerCommandCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
addResponse(JsonRpcResponse response) |
boolean |
cancel(boolean cancel) |
List<JsonRpcResponse> |
get() |
List<JsonRpcResponse> |
get(long time,
TimeUnit unit) |
BrokerCommandCallback |
getCallback()
The callback to notify after the specific command was invoked.
|
List<org.codehaus.jackson.JsonNode> |
getId() |
boolean |
isCancelled() |
boolean |
isDone() |
public BatchCall(List<JsonRpcRequest> requests)
public BatchCall(List<JsonRpcRequest> requests, BrokerCommandCallback callback)
public void addResponse(JsonRpcResponse response)
addResponse in interface JsonRpcCallresponse - Added to current call object.public boolean cancel(boolean cancel)
cancel in interface Future<List<JsonRpcResponse>>public List<JsonRpcResponse> get() throws InterruptedException, ExecutionException
get in interface Future<List<JsonRpcResponse>>InterruptedExceptionExecutionExceptionpublic List<JsonRpcResponse> get(long time, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Future<List<JsonRpcResponse>>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic boolean isCancelled()
isCancelled in interface Future<List<JsonRpcResponse>>public boolean isDone()
isDone in interface Future<List<JsonRpcResponse>>public List<org.codehaus.jackson.JsonNode> getId()
public BrokerCommandCallback getCallback()
JsonRpcCallgetCallback in interface JsonRpcCallCopyright © 2018. All Rights Reserved.