@SuppressWarnings("deprecation") public void addNewBestBlockListener(NewBestBlockListener listener) { //noinspection deprecation final BlockChain chain = walletsSetup.getChain(); if (isWalletReady() && chain != null) chain.addNewBestBlockListener(listener); }
@SuppressWarnings("deprecation") public void removeNewBestBlockListener(NewBestBlockListener listener) { //noinspection deprecation final BlockChain chain = walletsSetup.getChain(); if (isWalletReady() && chain != null) chain.removeNewBestBlockListener(listener); }
/** Adds a Blockchain NewBlockListener. * @param nbbl NewBestBlockListener to add. */ public void addNewBestBlockListener(NewBestBlockListener nbbl) { newBestBlockListeners.add(nbbl); wak.chain().addNewBestBlockListener(nbbl); }
/** Removes a Blockchain NewBlockListener. * @param nbbl NewBestBlockListener to remove. */ public void removeNewBestBlockListener(NewBestBlockListener nbbl) { newBestBlockListeners.remove(nbbl); wak.chain().removeNewBestBlockListener(nbbl); }
/** Removes all Blockchain NewBlockListener(s). */ public void removeAllNewBestBlockListeners() { for(NewBestBlockListener nbbl : newBestBlockListeners) wak.chain().removeNewBestBlockListener(nbbl); newBestBlockListeners.clear(); }