public interface Account extends TaskService
| Modifier and Type | Method and Description |
|---|---|
long |
availableBalance()
Runs the input selection with the CDAs in order to determine the usable balance for funding transfers.
|
String |
getId()
Returns the account’s unique identifier which is a sha256 hash of the account’s seed.
|
boolean |
isNew()
Checks whether the state of the account is new.
|
void |
load()
Loads the account’s inner event loop to accept commands and provided plugins using current the account settings
|
Future<ConditionalDepositAddress> |
newDepositAddress(Date timeOut,
boolean multiUse,
long expectedAmount,
ExpireCondition... otherConditions)
Allocates a new CDA in the underlying store.
|
Future<Bundle> |
send(Recipient recipient)
Sends the specified amounts to the given recipient.
|
void |
shutdown()
Shutdowns the account’s inner event loop and shutdowns all plugins.
|
boolean |
start()
Starts the account event loop
|
long |
totalBalance()
Uses all stored CDAs to determine the current total balance.
|
void |
updateSettings(AccountOptions newSettings)
Updates the settings of the account in a synchronized manner by shutting down all plugins,
stopping the event loop, applying the settings
and starting the newly defined plugins and kicking off the event loop again.
|
String getId() throws AccountError
AccountError - When we failed to generate the IDvoid load() throws AccountError
load in interface TaskServiceAccountError - When loading the account failedboolean start()
throws AccountError
start in interface TaskServicetrue if loaded successful. otherwise falseAccountError - When an error occurred during start-upvoid shutdown()
throws AccountError
shutdown in interface TaskServiceAccountErrorFuture<Bundle> send(Recipient recipient) throws AccountError
recipient - Information about the receiving end of the transactionsAccountErrorFuture<ConditionalDepositAddress> newDepositAddress(Date timeOut, boolean multiUse, long expectedAmount, ExpireCondition... otherConditions) throws AccountError
timeOut - The date this address expiresmultiUse - If we expect multiple depositsexpectedAmount - The final balance we expect to have in this address before we expireotherConditions - Currently unused, used to specify custom conditionsConditionalDepositAddress The newly generated CDAAccountError - When we were not able to generate a new addressAccountError - When invalid conditions were givenlong availableBalance()
throws AccountError
AccountError - When we failed to get the balancelong totalBalance()
throws AccountError
AccountError - When we failed to get the balanceboolean isNew()
true if it is new, otherwise falsevoid updateSettings(AccountOptions newSettings) throws AccountError
newSettings - The new settings for this accountAccountError - When we failed to update the settingsCopyright © 2019. All rights reserved.