Interface TransactionChainListener
-
- All Superinterfaces:
EventListener
public interface TransactionChainListener extends EventListener
Listener for transaction chain events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onTransactionChainFailed(@NonNull TransactionChain chain, @NonNull Transaction transaction, @NonNull Throwable cause)
Invoked if when a transaction in the chain fails.void
onTransactionChainSuccessful(@NonNull TransactionChain chain)
Invoked when a transaction chain is completed.
-
-
-
Method Detail
-
onTransactionChainFailed
void onTransactionChainFailed(@NonNull TransactionChain chain, @NonNull Transaction transaction, @NonNull Throwable cause)
Invoked if when a transaction in the chain fails. All transactions submitted after the failed transaction, in the chain, are automatically cancelled by the time this notification is invoked. Open transactions need to be closed or cancelled. Implementations should invoke chain.close() to close the chain.- Parameters:
chain
- Transaction chain which failedtransaction
- Transaction which caused the chain to failcause
- The cause of transaction failure
-
onTransactionChainSuccessful
void onTransactionChainSuccessful(@NonNull TransactionChain chain)
Invoked when a transaction chain is completed. A transaction chain is considered completed when it has been closed and all its instructions have completed successfully.- Parameters:
chain
- Transaction chain which completed
-
-