com.google.bitcoin.core
Enum TransactionConfidence.Listener.ChangeReason

java.lang.Object
  extended by java.lang.Enum<TransactionConfidence.Listener.ChangeReason>
      extended by com.google.bitcoin.core.TransactionConfidence.Listener.ChangeReason
All Implemented Interfaces:
Serializable, Comparable<TransactionConfidence.Listener.ChangeReason>
Enclosing interface:
TransactionConfidence.Listener

public static enum TransactionConfidence.Listener.ChangeReason
extends Enum<TransactionConfidence.Listener.ChangeReason>

An enum that describes why a transaction confidence listener is being invoked (i.e. the class of change).


Enum Constant Summary
DEPTH
          Occurs when a transaction that is in the best known block chain gets buried by another block.
SEEN_PEERS
          Occurs when a pending transaction (not in the chain) was announced by another connected peers.
TYPE
          Occurs when the type returned by TransactionConfidence.getConfidenceType() has changed.
 
Method Summary
static TransactionConfidence.Listener.ChangeReason valueOf(String name)
          Returns the enum constant of this type with the specified name.
static TransactionConfidence.Listener.ChangeReason[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

TYPE

public static final TransactionConfidence.Listener.ChangeReason TYPE
Occurs when the type returned by TransactionConfidence.getConfidenceType() has changed. For example, if a PENDING transaction changes to BUILDING or DEAD, then this reason will be given. It's a high level summary.


DEPTH

public static final TransactionConfidence.Listener.ChangeReason DEPTH
Occurs when a transaction that is in the best known block chain gets buried by another block. If you're waiting for a certain number of confirmations, this is the reason to watch out for.


SEEN_PEERS

public static final TransactionConfidence.Listener.ChangeReason SEEN_PEERS
Occurs when a pending transaction (not in the chain) was announced by another connected peers. By watching the number of peers that announced a transaction go up, you can see whether it's being accepted by the network or not. If all your peers announce, it's a pretty good bet the transaction is considered relayable and has thus reached the miners.

Method Detail

values

public static TransactionConfidence.Listener.ChangeReason[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TransactionConfidence.Listener.ChangeReason c : TransactionConfidence.Listener.ChangeReason.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static TransactionConfidence.Listener.ChangeReason valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2014. All rights reserved.