java.lang.Object
com.hedera.hashgraph.sdk.Executable<AccountBalanceQuery,Query,Response,AccountBalance>
com.hedera.hashgraph.sdk.Query<AccountBalance,AccountBalanceQuery>
com.hedera.hashgraph.sdk.AccountBalanceQuery
@Deprecated
public final class AccountBalanceQuery
extends Query<AccountBalance,AccountBalanceQuery>
Deprecated.
Get the balance of a Hederaâ„¢ crypto-currency account. This returns only the balance, so it is a
smaller and faster reply than
AccountInfoQuery.
This query is free.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.hedera.hashgraph.sdk.Executable
Executable.GrpcRequest -
Field Summary
FieldsFields inherited from class com.hedera.hashgraph.sdk.Query
paymentTransactionId, paymentTransactionsFields inherited from class com.hedera.hashgraph.sdk.Executable
attemptedAllNodes, blockingUnaryCall, grpcDeadline, logger, maxAttempts, maxBackoff, minBackoff, nodeAccountIds, nodes, random, RST_STREAM -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.executeAsync(Client client, Duration timeout) Deprecated.@Nullable AccountIdDeprecated.Return the account's id.@Nullable ContractIdDeprecated.Extract the contract id.Deprecated.getCostAsync(Client client, Duration timeout) Deprecated.Deprecated.Called to direct the invocation of the query to the appropriate gRPC service.(package private) booleanDeprecated.Does this query require a payment?(package private) QueryHeadermapRequestHeader(Query request) Deprecated.The derived class should access its request header and return.(package private) AccountBalancemapResponse(Response response, AccountId nodeId, Query request) Deprecated.Called after receiving the query response from Hedera.(package private) ResponseHeadermapResponseHeader(Response response) Deprecated.The derived class should access its response header and return.(package private) voidonMakeRequest(Query.Builder queryBuilder, QueryHeader header) Deprecated.Called inQuery.makeRequest()just before the query is built.setAccountId(AccountId accountId) Deprecated.The account ID for which the balance is being requested.setContractId(ContractId contractId) Deprecated.The contract ID for which the balance is being requested.(package private) voidvalidateChecksums(Client client) Deprecated.Validate the checksums.Methods inherited from class com.hedera.hashgraph.sdk.Query
getCost, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getCostAsync, getOperatorFromClient, getPaymentTransaction, getPaymentTransactionId, getTransactionIdInternal, makeRequest, mapResponseStatus, onExecute, onExecuteAsync, setMaxQueryPayment, setPaymentTransactionId, setQueryPayment, toStringMethods inherited from class com.hedera.hashgraph.sdk.Executable
advanceRequest, checkNodeAccountIds, execute, executeAsync, executeAsync, executeAsync, executeAsync, executeAsync, getExecutionState, getGrpcRequest, getMaxAttempts, getMaxBackoff, getMaxRetry, getMinBackoff, getNodeAccountIds, getNodeForExecute, grpcDeadline, isBatchedAndNotBatchTransaction, logTransaction, mergeFromClient, setGrpcDeadline, setLogger, setMaxAttempts, setMaxBackoff, setMaxRetry, setMinBackoff, setNodeAccountIds, setNodesFromNodeAccountIds, setRequestListener, setResponseListener, shouldRetryExceptionally
-
Field Details
-
DEPRECATION_MESSAGE
Deprecated.- See Also:
-
-
Constructor Details
-
AccountBalanceQuery
Deprecated.Constructor.
-
-
Method Details
-
getAccountId
Deprecated.Return the account's id.- Returns:
accountId
-
setAccountId
Deprecated.The account ID for which the balance is being requested.This is mutually exclusive with
setContractId(ContractId).- Parameters:
accountId- The AccountId to set- Returns:
this
-
getContractId
Deprecated.Extract the contract id.- Returns:
- the contract id
-
setContractId
Deprecated.The contract ID for which the balance is being requested.This is mutually exclusive with
setAccountId(AccountId).- Parameters:
contractId- The ContractId to set- Returns:
this
-
execute
Deprecated.Description copied from class:ExecutableExecute this transaction or query with a timeout- Overrides:
executein classExecutable<AccountBalanceQuery,Query, Response, AccountBalance> - Parameters:
client- the client with which this would have been executedtimeout- ignored- Returns:
- never returns
- Throws:
UnsupportedOperationException- always
-
executeAsync
Deprecated.Description copied from class:ExecutableExecute this transaction or query asynchronously.Note: This method requires API level 33 or higher. It will not work on devices running API versions below 31 because it uses features introduced in API level 31 (Android 12).
*- Overrides:
executeAsyncin classExecutable<AccountBalanceQuery,Query, Response, AccountBalance> - Parameters:
client- the client with which this would have been executedtimeout- ignored- Returns:
- a future that has already failed with
UnsupportedOperationException
-
getCost
Deprecated.Description copied from class:QueryFetch the expected cost.- Overrides:
getCostin classQuery<AccountBalance,AccountBalanceQuery> - Parameters:
client- the client with which this would have been executedtimeout- ignored- Returns:
- never returns
- Throws:
UnsupportedOperationException- always
-
getCostAsync
Deprecated.Description copied from class:QueryFetch the expected cost asynchronously.- Overrides:
getCostAsyncin classQuery<AccountBalance,AccountBalanceQuery> - Parameters:
client- the client with which this would have been executedtimeout- ignored- Returns:
- a future that has already failed with
UnsupportedOperationException
-
validateChecksums
Deprecated.Description copied from class:QueryValidate the checksums.- Specified by:
validateChecksumsin classQuery<AccountBalance,AccountBalanceQuery> - Throws:
BadEntityIdException
-
isPaymentRequired
boolean isPaymentRequired()Deprecated.Description copied from class:QueryDoes this query require a payment?- Overrides:
isPaymentRequiredin classQuery<AccountBalance,AccountBalanceQuery> - Returns:
- does this query require a payment
-
onMakeRequest
Deprecated.Description copied from class:QueryCalled inQuery.makeRequest()just before the query is built. The intent is for the derived class to assign their data variant to the query.- Specified by:
onMakeRequestin classQuery<AccountBalance,AccountBalanceQuery>
-
mapResponse
Deprecated.Description copied from class:ExecutableCalled after receiving the query response from Hedera. The derived class should map into its output type.- Specified by:
mapResponsein classExecutable<AccountBalanceQuery,Query, Response, AccountBalance>
-
mapResponseHeader
Deprecated.Description copied from class:QueryThe derived class should access its response header and return.- Specified by:
mapResponseHeaderin classQuery<AccountBalance,AccountBalanceQuery>
-
mapRequestHeader
Deprecated.Description copied from class:QueryThe derived class should access its request header and return.- Specified by:
mapRequestHeaderin classQuery<AccountBalance,AccountBalanceQuery>
-
getMethodDescriptor
Deprecated.Description copied from class:ExecutableCalled to direct the invocation of the query to the appropriate gRPC service.- Specified by:
getMethodDescriptorin classExecutable<AccountBalanceQuery,Query, Response, AccountBalance>
-
MirrorNodeAccountBalanceQueryor the mirror node REST API (GET /api/v1/accounts/{id}) to retrieve account balances.