
software.amazon.awssdk.services.managedblockchainquery.ManagedBlockchainQueryAsyncClient Maven / Gradle / Ivy
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package software.amazon.awssdk.services.managedblockchainquery;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.annotations.ThreadSafe;
import software.amazon.awssdk.awscore.AwsClient;
import software.amazon.awssdk.services.managedblockchainquery.model.BatchGetTokenBalanceRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.BatchGetTokenBalanceResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.GetAssetContractRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.GetAssetContractResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.GetTokenBalanceRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.GetTokenBalanceResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.GetTransactionRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.GetTransactionResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsResponse;
import software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest;
import software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsResponse;
import software.amazon.awssdk.services.managedblockchainquery.paginators.ListAssetContractsPublisher;
import software.amazon.awssdk.services.managedblockchainquery.paginators.ListTokenBalancesPublisher;
import software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionEventsPublisher;
import software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionsPublisher;
/**
* Service client for accessing Amazon Managed Blockchain Query asynchronously. This can be created using the static
* {@link #builder()} method.
*
*
* Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which
* makes it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to read data
* from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can also get information such as
* the current and historical balances of addresses, or you can get a list of blockchain transactions for a given time
* period. Additionally, you can get details of a given transaction, such as transaction events, which you can further
* analyze or use in business logic for your applications.
*
*/
@Generated("software.amazon.awssdk:codegen")
@SdkPublicApi
@ThreadSafe
public interface ManagedBlockchainQueryAsyncClient extends AwsClient {
String SERVICE_NAME = "managedblockchain-query";
/**
* Value for looking up the service's metadata from the
* {@link software.amazon.awssdk.regions.ServiceMetadataProvider}.
*/
String SERVICE_METADATA_ID = "managedblockchain-query";
/**
*
* Gets the token balance for a batch of tokens by using the BatchGetTokenBalance
action for every
* token in the request.
*
*
*
* Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
*
*
*
* @param batchGetTokenBalanceRequest
* @return A Java Future containing the result of the BatchGetTokenBalance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.BatchGetTokenBalance
* @see AWS API Documentation
*/
default CompletableFuture batchGetTokenBalance(
BatchGetTokenBalanceRequest batchGetTokenBalanceRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Gets the token balance for a batch of tokens by using the BatchGetTokenBalance
action for every
* token in the request.
*
*
*
* Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
*
*
*
* This is a convenience which creates an instance of the {@link BatchGetTokenBalanceRequest.Builder} avoiding the
* need to create one manually via {@link BatchGetTokenBalanceRequest#builder()}
*
*
* @param batchGetTokenBalanceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.BatchGetTokenBalanceRequest.Builder}
* to create a request.
* @return A Java Future containing the result of the BatchGetTokenBalance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.BatchGetTokenBalance
* @see AWS API Documentation
*/
default CompletableFuture batchGetTokenBalance(
Consumer batchGetTokenBalanceRequest) {
return batchGetTokenBalance(BatchGetTokenBalanceRequest.builder().applyMutation(batchGetTokenBalanceRequest).build());
}
/**
*
* Gets the information about a specific contract deployed on the blockchain.
*
*
*
* -
*
* The Bitcoin blockchain networks do not support this operation.
*
*
* -
*
* Metadata is currently only available for some ERC-20
contracts. Metadata will be available for
* additional contracts in the future.
*
*
*
*
*
* @param getAssetContractRequest
* @return A Java Future containing the result of the GetAssetContract operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.GetAssetContract
* @see AWS API Documentation
*/
default CompletableFuture getAssetContract(GetAssetContractRequest getAssetContractRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Gets the information about a specific contract deployed on the blockchain.
*
*
*
* -
*
* The Bitcoin blockchain networks do not support this operation.
*
*
* -
*
* Metadata is currently only available for some ERC-20
contracts. Metadata will be available for
* additional contracts in the future.
*
*
*
*
*
* This is a convenience which creates an instance of the {@link GetAssetContractRequest.Builder} avoiding the need
* to create one manually via {@link GetAssetContractRequest#builder()}
*
*
* @param getAssetContractRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.GetAssetContractRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the GetAssetContract operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.GetAssetContract
* @see AWS API Documentation
*/
default CompletableFuture getAssetContract(
Consumer getAssetContractRequest) {
return getAssetContract(GetAssetContractRequest.builder().applyMutation(getAssetContractRequest).build());
}
/**
*
* Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the
* blockchain.
*
*
*
* Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
*
*
*
* @param getTokenBalanceRequest
* @return A Java Future containing the result of the GetTokenBalance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.GetTokenBalance
* @see AWS API Documentation
*/
default CompletableFuture getTokenBalance(GetTokenBalanceRequest getTokenBalanceRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the
* blockchain.
*
*
*
* Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.
*
*
*
* This is a convenience which creates an instance of the {@link GetTokenBalanceRequest.Builder} avoiding the need
* to create one manually via {@link GetTokenBalanceRequest#builder()}
*
*
* @param getTokenBalanceRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.GetTokenBalanceRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the GetTokenBalance operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.GetTokenBalance
* @see AWS API Documentation
*/
default CompletableFuture getTokenBalance(
Consumer getTokenBalanceRequest) {
return getTokenBalance(GetTokenBalanceRequest.builder().applyMutation(getTokenBalanceRequest).build());
}
/**
*
* Gets the details of a transaction.
*
*
*
* This action will return transaction details for all transactions that are confirmed on the blockchain,
* even if they have not reached finality.
*
*
*
* @param getTransactionRequest
* @return A Java Future containing the result of the GetTransaction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.GetTransaction
* @see AWS API Documentation
*/
default CompletableFuture getTransaction(GetTransactionRequest getTransactionRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Gets the details of a transaction.
*
*
*
* This action will return transaction details for all transactions that are confirmed on the blockchain,
* even if they have not reached finality.
*
*
*
* This is a convenience which creates an instance of the {@link GetTransactionRequest.Builder} avoiding the need to
* create one manually via {@link GetTransactionRequest#builder()}
*
*
* @param getTransactionRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.GetTransactionRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the GetTransaction operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - ResourceNotFoundException The resource was not found.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.GetTransaction
* @see AWS API Documentation
*/
default CompletableFuture getTransaction(Consumer getTransactionRequest) {
return getTransaction(GetTransactionRequest.builder().applyMutation(getTransactionRequest).build());
}
/**
*
* Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet
* address).
*
*
* The Bitcoin blockchain networks do not support this operation.
*
*
* @param listAssetContractsRequest
* @return A Java Future containing the result of the ListAssetContracts operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListAssetContracts
* @see AWS API Documentation
*/
default CompletableFuture listAssetContracts(ListAssetContractsRequest listAssetContractsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet
* address).
*
*
* The Bitcoin blockchain networks do not support this operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListAssetContractsRequest.Builder} avoiding the
* need to create one manually via {@link ListAssetContractsRequest#builder()}
*
*
* @param listAssetContractsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the ListAssetContracts operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListAssetContracts
* @see AWS API Documentation
*/
default CompletableFuture listAssetContracts(
Consumer listAssetContractsRequest) {
return listAssetContracts(ListAssetContractsRequest.builder().applyMutation(listAssetContractsRequest).build());
}
/**
*
* This is a variant of
* {@link #listAssetContracts(software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListAssetContractsPublisher publisher = client.listAssetContractsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListAssetContractsPublisher publisher = client.listAssetContractsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listAssetContracts(software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest)}
* operation.
*
*
* @param listAssetContractsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListAssetContracts
* @see AWS API Documentation
*/
default ListAssetContractsPublisher listAssetContractsPaginator(ListAssetContractsRequest listAssetContractsRequest) {
return new ListAssetContractsPublisher(this, listAssetContractsRequest);
}
/**
*
* This is a variant of
* {@link #listAssetContracts(software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListAssetContractsPublisher publisher = client.listAssetContractsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListAssetContractsPublisher publisher = client.listAssetContractsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listAssetContracts(software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListAssetContractsRequest.Builder} avoiding the
* need to create one manually via {@link ListAssetContractsRequest#builder()}
*
*
* @param listAssetContractsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListAssetContractsRequest.Builder} to
* create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListAssetContracts
* @see AWS API Documentation
*/
default ListAssetContractsPublisher listAssetContractsPaginator(
Consumer listAssetContractsRequest) {
return listAssetContractsPaginator(ListAssetContractsRequest.builder().applyMutation(listAssetContractsRequest).build());
}
/**
*
* This action returns the following for a given blockchain network:
*
*
* -
*
* Lists all token balances owned by an address (either a contract address or a wallet address).
*
*
* -
*
* Lists all token balances for all tokens created by a contract.
*
*
* -
*
* Lists all token balances for a given token.
*
*
*
*
*
* You must always specify the network property of the tokenFilter
when using this operation.
*
*
*
* @param listTokenBalancesRequest
* @return A Java Future containing the result of the ListTokenBalances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTokenBalances
* @see AWS API Documentation
*/
default CompletableFuture listTokenBalances(ListTokenBalancesRequest listTokenBalancesRequest) {
throw new UnsupportedOperationException();
}
/**
*
* This action returns the following for a given blockchain network:
*
*
* -
*
* Lists all token balances owned by an address (either a contract address or a wallet address).
*
*
* -
*
* Lists all token balances for all tokens created by a contract.
*
*
* -
*
* Lists all token balances for a given token.
*
*
*
*
*
* You must always specify the network property of the tokenFilter
when using this operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListTokenBalancesRequest.Builder} avoiding the need
* to create one manually via {@link ListTokenBalancesRequest#builder()}
*
*
* @param listTokenBalancesRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the ListTokenBalances operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTokenBalances
* @see AWS API Documentation
*/
default CompletableFuture listTokenBalances(
Consumer listTokenBalancesRequest) {
return listTokenBalances(ListTokenBalancesRequest.builder().applyMutation(listTokenBalancesRequest).build());
}
/**
*
* This is a variant of
* {@link #listTokenBalances(software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTokenBalancesPublisher publisher = client.listTokenBalancesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTokenBalancesPublisher publisher = client.listTokenBalancesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTokenBalances(software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest)}
* operation.
*
*
* @param listTokenBalancesRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTokenBalances
* @see AWS API Documentation
*/
default ListTokenBalancesPublisher listTokenBalancesPaginator(ListTokenBalancesRequest listTokenBalancesRequest) {
return new ListTokenBalancesPublisher(this, listTokenBalancesRequest);
}
/**
*
* This is a variant of
* {@link #listTokenBalances(software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTokenBalancesPublisher publisher = client.listTokenBalancesPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTokenBalancesPublisher publisher = client.listTokenBalancesPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTokenBalances(software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListTokenBalancesRequest.Builder} avoiding the need
* to create one manually via {@link ListTokenBalancesRequest#builder()}
*
*
* @param listTokenBalancesRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListTokenBalancesRequest.Builder} to
* create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTokenBalances
* @see AWS API Documentation
*/
default ListTokenBalancesPublisher listTokenBalancesPaginator(
Consumer listTokenBalancesRequest) {
return listTokenBalancesPaginator(ListTokenBalancesRequest.builder().applyMutation(listTokenBalancesRequest).build());
}
/**
*
* An array of TransactionEvent
objects. Each object contains details about the transaction event.
*
*
*
* This action will return transaction details for all transactions that are confirmed on the blockchain,
* even if they have not reached finality.
*
*
*
* @param listTransactionEventsRequest
* @return A Java Future containing the result of the ListTransactionEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactionEvents
* @see AWS API Documentation
*/
default CompletableFuture listTransactionEvents(
ListTransactionEventsRequest listTransactionEventsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* An array of TransactionEvent
objects. Each object contains details about the transaction event.
*
*
*
* This action will return transaction details for all transactions that are confirmed on the blockchain,
* even if they have not reached finality.
*
*
*
* This is a convenience which creates an instance of the {@link ListTransactionEventsRequest.Builder} avoiding the
* need to create one manually via {@link ListTransactionEventsRequest#builder()}
*
*
* @param listTransactionEventsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest.Builder}
* to create a request.
* @return A Java Future containing the result of the ListTransactionEvents operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactionEvents
* @see AWS API Documentation
*/
default CompletableFuture listTransactionEvents(
Consumer listTransactionEventsRequest) {
return listTransactionEvents(ListTransactionEventsRequest.builder().applyMutation(listTransactionEventsRequest).build());
}
/**
*
* This is a variant of
* {@link #listTransactionEvents(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionEventsPublisher publisher = client.listTransactionEventsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionEventsPublisher publisher = client.listTransactionEventsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTransactionEvents(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest)}
* operation.
*
*
* @param listTransactionEventsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactionEvents
* @see AWS API Documentation
*/
default ListTransactionEventsPublisher listTransactionEventsPaginator(
ListTransactionEventsRequest listTransactionEventsRequest) {
return new ListTransactionEventsPublisher(this, listTransactionEventsRequest);
}
/**
*
* This is a variant of
* {@link #listTransactionEvents(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionEventsPublisher publisher = client.listTransactionEventsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionEventsPublisher publisher = client.listTransactionEventsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTransactionEvents(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListTransactionEventsRequest.Builder} avoiding the
* need to create one manually via {@link ListTransactionEventsRequest#builder()}
*
*
* @param listTransactionEventsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionEventsRequest.Builder}
* to create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactionEvents
* @see AWS API Documentation
*/
default ListTransactionEventsPublisher listTransactionEventsPaginator(
Consumer listTransactionEventsRequest) {
return listTransactionEventsPaginator(ListTransactionEventsRequest.builder().applyMutation(listTransactionEventsRequest)
.build());
}
/**
*
* Lists all of the transactions on a given wallet address or to a specific contract.
*
*
* @param listTransactionsRequest
* @return A Java Future containing the result of the ListTransactions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactions
* @see AWS API Documentation
*/
default CompletableFuture listTransactions(ListTransactionsRequest listTransactionsRequest) {
throw new UnsupportedOperationException();
}
/**
*
* Lists all of the transactions on a given wallet address or to a specific contract.
*
*
*
* This is a convenience which creates an instance of the {@link ListTransactionsRequest.Builder} avoiding the need
* to create one manually via {@link ListTransactionsRequest#builder()}
*
*
* @param listTransactionsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest.Builder} to
* create a request.
* @return A Java Future containing the result of the ListTransactions operation returned by the service.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactions
* @see AWS API Documentation
*/
default CompletableFuture listTransactions(
Consumer listTransactionsRequest) {
return listTransactions(ListTransactionsRequest.builder().applyMutation(listTransactionsRequest).build());
}
/**
*
* This is a variant of
* {@link #listTransactions(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionsPublisher publisher = client.listTransactionsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionsPublisher publisher = client.listTransactionsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTransactions(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest)}
* operation.
*
*
* @param listTransactionsRequest
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactions
* @see AWS API Documentation
*/
default ListTransactionsPublisher listTransactionsPaginator(ListTransactionsRequest listTransactionsRequest) {
return new ListTransactionsPublisher(this, listTransactionsRequest);
}
/**
*
* This is a variant of
* {@link #listTransactions(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest)}
* operation. The return type is a custom publisher that can be subscribed to request a stream of response pages.
* SDK will internally handle making service calls for you.
*
*
* When the operation is called, an instance of this class is returned. At this point, no service calls are made yet
* and so there is no guarantee that the request is valid. If there are errors in your request, you will see the
* failures only after you start streaming the data. The subscribe method should be called as a request to start
* streaming data. For more info, see
* {@link org.reactivestreams.Publisher#subscribe(org.reactivestreams.Subscriber)}. Each call to the subscribe
* method will result in a new {@link org.reactivestreams.Subscription} i.e., a new contract to stream data from the
* starting request.
*
*
*
* The following are few ways to use the response class:
*
* 1) Using the subscribe helper method
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionsPublisher publisher = client.listTransactionsPaginator(request);
* CompletableFuture future = publisher.subscribe(res -> { // Do something with the response });
* future.get();
* }
*
*
* 2) Using a custom subscriber
*
*
* {@code
* software.amazon.awssdk.services.managedblockchainquery.paginators.ListTransactionsPublisher publisher = client.listTransactionsPaginator(request);
* publisher.subscribe(new Subscriber() {
*
* public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... };
*
*
* public void onNext(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsResponse response) { //... };
* });}
*
*
* As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.
*
* Please notice that the configuration of maxResults won't limit the number of results you get with the
* paginator. It only limits the number of results in each page.
*
*
* Note: If you prefer to have control on service calls, use the
* {@link #listTransactions(software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest)}
* operation.
*
*
*
* This is a convenience which creates an instance of the {@link ListTransactionsRequest.Builder} avoiding the need
* to create one manually via {@link ListTransactionsRequest#builder()}
*
*
* @param listTransactionsRequest
* A {@link Consumer} that will call methods on
* {@link software.amazon.awssdk.services.managedblockchainquery.model.ListTransactionsRequest.Builder} to
* create a request.
* @return A custom publisher that can be subscribed to request a stream of response pages.
* The CompletableFuture returned by this method can be completed exceptionally with the following
* exceptions.
*
* - ThrottlingException The request or operation couldn't be performed because a service is throttling
* requests. The most common source of throttling errors is when you create resources that exceed your
* service limit for this resource type. Request a limit increase or delete unused resources, if possible.
* - ValidationException The resource passed is invalid.
* - AccessDeniedException The Amazon Web Services account doesn’t have access to this resource.
* - InternalServerException The request processing has failed because of an internal error in the
* service.
* - ServiceQuotaExceededException The service quota has been exceeded for this resource.
* - SdkException Base class for all exceptions that can be thrown by the SDK (both service and client).
* Can be used for catch all scenarios.
* - SdkClientException If any client side error occurs such as an IO related failure, failure to get
* credentials, etc.
* - ManagedBlockchainQueryException Base class for all service exceptions. Unknown exceptions will be
* thrown as an instance of this type.
*
* @sample ManagedBlockchainQueryAsyncClient.ListTransactions
* @see AWS API Documentation
*/
default ListTransactionsPublisher listTransactionsPaginator(Consumer listTransactionsRequest) {
return listTransactionsPaginator(ListTransactionsRequest.builder().applyMutation(listTransactionsRequest).build());
}
@Override
default ManagedBlockchainQueryServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
/**
* Create a {@link ManagedBlockchainQueryAsyncClient} with the region loaded from the
* {@link software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain} and credentials loaded from the
* {@link software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider}.
*/
static ManagedBlockchainQueryAsyncClient create() {
return builder().build();
}
/**
* Create a builder that can be used to configure and create a {@link ManagedBlockchainQueryAsyncClient}.
*/
static ManagedBlockchainQueryAsyncClientBuilder builder() {
return new DefaultManagedBlockchainQueryAsyncClientBuilder();
}
}