Class NativeWalletCoinsReceivedEventListener

  • All Implemented Interfaces:
    WalletCoinsReceivedEventListener

    @Deprecated
    public class NativeWalletCoinsReceivedEventListener
    extends java.lang.Object
    implements WalletCoinsReceivedEventListener
    Deprecated.
    See https://github.com/bitcoinj/bitcoinj/issues/2465
    An event listener that relays events to a native C++ object. A pointer to that object is stored in this class using JNI on the native side, thus several instances of this can point to different actual native implementations.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      long ptr
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void onCoinsReceived​(Wallet wallet, Transaction tx, Coin prevBalance, Coin newBalance)
      Deprecated.
      This is called when a transaction is seen that sends coins to this wallet, either because it was broadcast across the network or because a block was received.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ptr

        public long ptr
        Deprecated.
    • Constructor Detail

      • NativeWalletCoinsReceivedEventListener

        public NativeWalletCoinsReceivedEventListener()
        Deprecated.
    • Method Detail

      • onCoinsReceived

        public void onCoinsReceived​(Wallet wallet,
                                    Transaction tx,
                                    Coin prevBalance,
                                    Coin newBalance)
        Deprecated.
        Description copied from interface: WalletCoinsReceivedEventListener
        This is called when a transaction is seen that sends coins to this wallet, either because it was broadcast across the network or because a block was received. If a transaction is seen when it was broadcast, onCoinsReceived won't be called again when a block containing it is received. If you want to know when such a transaction receives its first confirmation, register a TransactionConfidence event listener using the object retrieved via Transaction.getConfidence(). It's safe to modify the wallet in this callback, for example, by spending the transaction just received.
        Specified by:
        onCoinsReceived in interface WalletCoinsReceivedEventListener
        Parameters:
        wallet - The wallet object that received the coins
        tx - The transaction which sent us the coins.
        prevBalance - Balance before the coins were received.
        newBalance - Current balance of the wallet. This is the 'estimated' balance.