Java 类org.bitcoinj.core.listeners.NewBestBlockListener 实例源码

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