当前位置: 首页>>代码示例>>Java>>正文


Java WalletChangeEventListener类代码示例

本文整理汇总了Java中org.bitcoinj.wallet.listeners.WalletChangeEventListener的典型用法代码示例。如果您正苦于以下问题:Java WalletChangeEventListener类的具体用法?Java WalletChangeEventListener怎么用?Java WalletChangeEventListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WalletChangeEventListener类属于org.bitcoinj.wallet.listeners包,在下文中一共展示了WalletChangeEventListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: maybeQueueOnWalletChanged

import org.bitcoinj.wallet.listeners.WalletChangeEventListener; //导入依赖的package包/类
protected void maybeQueueOnWalletChanged() {
    // Don't invoke the callback in some circumstances, eg, whilst we are re-organizing or fiddling with
    // transactions due to a new block arriving. It will be called later instead.
    checkState(lock.isHeldByCurrentThread());
    checkState(onWalletChangedSuppressions >= 0);
    if (onWalletChangedSuppressions > 0) return;
    for (final ListenerRegistration<WalletChangeEventListener> registration : changeListeners) {
        registration.executor.execute(new Runnable() {
            @Override
            public void run() {
                registration.listener.onWalletChanged(Wallet.this);
            }
        });
    }
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:16,代码来源:Wallet.java

示例2: addChangeEventListener

import org.bitcoinj.wallet.listeners.WalletChangeEventListener; //导入依赖的package包/类
/**
 * Adds an event listener object. Methods on this object are called when something interesting happens,
 * like receiving money. The listener is executed by the given executor.
 */
public void addChangeEventListener(Executor executor, WalletChangeEventListener listener) {
    // This is thread safe, so we don't need to take the lock.
    changeListeners.add(new ListenerRegistration<>(listener, executor));
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:9,代码来源:Wallet.java

示例3: addChangeEventListener

import org.bitcoinj.wallet.listeners.WalletChangeEventListener; //导入依赖的package包/类
/**
 * Adds an event listener object. Methods on this object are called when something interesting happens,
 * like receiving money. The listener is executed by the given executor.
 */
public void addChangeEventListener(Executor executor, WalletChangeEventListener listener) {
    // This is thread safe, so we don't need to take the lock.
    changeListeners.add(new ListenerRegistration<WalletChangeEventListener>(listener, executor));
}
 
开发者ID:Grant-Redmond,项目名称:cryptwallet,代码行数:9,代码来源:Wallet.java

示例4: removeChangeEventListener

import org.bitcoinj.wallet.listeners.WalletChangeEventListener; //导入依赖的package包/类
/**
 * Removes the given event listener object. Returns true if the listener was removed, false if that listener
 * was never added.
 */
public boolean removeChangeEventListener(WalletChangeEventListener listener) {
    return ListenerRegistration.removeFromList(listener, changeListeners);
}
 
开发者ID:guodroid,项目名称:okwallet,代码行数:8,代码来源:Wallet.java


注:本文中的org.bitcoinj.wallet.listeners.WalletChangeEventListener类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。