Java Code Examples for org.web3j.utils.Async#run()

The following examples show how to use org.web3j.utils.Async#run() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Service.java    From client-sdk-java with Apache License 2.0 4 votes vote down vote up
@Override
public <T extends Response> CompletableFuture<T> sendAsync(
        Request jsonRpc20Request, Class<T> responseType) {
    return Async.run(() -> send(jsonRpc20Request, responseType));
}
 
Example 2
Source File: Service.java    From etherscan-explorer with GNU General Public License v3.0 4 votes vote down vote up
@Override
public <T extends Response> CompletableFuture<T> sendAsync(
        Request jsonRpc20Request, Class<T> responseType) {
    return Async.run(() -> send(jsonRpc20Request, responseType));
}
 
Example 3
Source File: Service.java    From web3j with Apache License 2.0 4 votes vote down vote up
@Override
public <T extends Response> CompletableFuture<T> sendAsync(
        Request jsonRpc20Request, Class<T> responseType) {
    return Async.run(() -> send(jsonRpc20Request, responseType));
}
 
Example 4
Source File: Service.java    From web3j with Apache License 2.0 4 votes vote down vote up
@Override
public CompletableFuture<BatchResponse> sendBatchAsync(BatchRequest batchRequest) {
    return Async.run(() -> sendBatch(batchRequest));
}
 
Example 5
Source File: RemoteCall.java    From client-sdk-java with Apache License 2.0 2 votes vote down vote up
/**
 * Perform request asynchronously with a future.
 *
 * @return a future containing our function
 */
public CompletableFuture<T> sendAsync() {
    return Async.run(this::send);
}
 
Example 6
Source File: RemoteCall.java    From etherscan-explorer with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Perform request asynchronously with a future.
 *
 * @return a future containing our function
 */
public CompletableFuture<T> sendAsync() {
    return Async.run(this::send);
}
 
Example 7
Source File: RemoteCall.java    From web3j with Apache License 2.0 2 votes vote down vote up
/**
 * Perform request asynchronously with a future.
 *
 * @return a future containing our function
 */
public CompletableFuture<T> sendAsync() {
    return Async.run(this::send);
}