Package monero.wallet.model
Class MoneroWalletListener
java.lang.Object
monero.wallet.model.MoneroWalletListener
- All Implemented Interfaces:
MoneroWalletListenerI
Default wallet listener which takes no action on notifications.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onBalancesChanged
(BigInteger newBalance, BigInteger newUnlockedBalance) Invoked when the wallet's balances change.void
onNewBlock
(long height) Invoked when a new block is added to the chain.void
onOutputReceived
(MoneroOutputWallet output) Invoked 3 times per received output: once when unconfirmed, once when confirmed, and once when unlocked.void
onOutputSpent
(MoneroOutputWallet output) Invoked twice per spent output: once when confirmed and once when unlocked.void
onSyncProgress
(long height, long startHeight, long endHeight, double percentDone, String message) Invoked as the wallet is synchronized.
-
Constructor Details
-
MoneroWalletListener
public MoneroWalletListener()
-
-
Method Details
-
onSyncProgress
public void onSyncProgress(long height, long startHeight, long endHeight, double percentDone, String message) Description copied from interface:MoneroWalletListenerI
Invoked as the wallet is synchronized.- Specified by:
onSyncProgress
in interfaceMoneroWalletListenerI
- Parameters:
height
- - height of the synced blockstartHeight
- - starting height of the sync requestendHeight
- - ending height of the sync requestpercentDone
- - sync progress as a percentagemessage
- is a human-readable description of the current progress
-
onNewBlock
public void onNewBlock(long height) Description copied from interface:MoneroWalletListenerI
Invoked when a new block is added to the chain.- Specified by:
onNewBlock
in interfaceMoneroWalletListenerI
- Parameters:
height
- - the height of the new block (i.e. the number of blocks before it).
-
onBalancesChanged
Description copied from interface:MoneroWalletListenerI
Invoked when the wallet's balances change.- Specified by:
onBalancesChanged
in interfaceMoneroWalletListenerI
- Parameters:
newBalance
- - new wallet balancenewUnlockedBalance
- - new unlocked wallet balance
-
onOutputReceived
Description copied from interface:MoneroWalletListenerI
Invoked 3 times per received output: once when unconfirmed, once when confirmed, and once when unlocked.- Specified by:
onOutputReceived
in interfaceMoneroWalletListenerI
- Parameters:
output
- - the received output
-
onOutputSpent
Description copied from interface:MoneroWalletListenerI
Invoked twice per spent output: once when confirmed and once when unlocked.- Specified by:
onOutputSpent
in interfaceMoneroWalletListenerI
- Parameters:
output
- - the spent output
-