|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.bitcoin.protocols.channels.StoredPaymentChannelClientStates
public class StoredPaymentChannelClientStates
This class maintains a set of StoredClientChannels, automatically (re)broadcasting the contract transaction
and broadcasting the refund transaction over the given TransactionBroadcaster.
| Field Summary | |
|---|---|
protected ReentrantLock |
lock
|
| Constructor Summary | |
|---|---|
StoredPaymentChannelClientStates(Wallet containingWallet,
TransactionBroadcaster announcePeerGroup)
Creates a new StoredPaymentChannelClientStates and associates it with the given Wallet and
TransactionBroadcaster which are used to complete and announce contract and refund
transactions. |
|
| Method Summary | |
|---|---|
void |
deserializeWalletExtension(Wallet containingWallet,
byte[] data)
Loads the contents of this object from the wallet. |
BigInteger |
getBalanceForServer(Sha256Hash id)
Returns the outstanding amount of money sent back to us for all channels to this server added together. |
static StoredPaymentChannelClientStates |
getFromWallet(Wallet wallet)
Returns this extension from the given wallet, or null if no such extension was added. |
long |
getSecondsUntilExpiry(Sha256Hash id)
Returns the number of seconds from now until this servers next channel will expire, or zero if no unexpired channels found. |
String |
getWalletExtensionID()
Returns a Java package/class style name used to disambiguate this extension from others. |
boolean |
isWalletExtensionMandatory()
If this returns true, the mandatory flag is set when the wallet is serialized and attempts to load it without the extension being in the wallet will throw an exception. |
byte[] |
serializeWalletExtension()
Returns bytes that will be saved in the wallet. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final ReentrantLock lock
| Constructor Detail |
|---|
public StoredPaymentChannelClientStates(Wallet containingWallet,
TransactionBroadcaster announcePeerGroup)
Wallet and
TransactionBroadcaster which are used to complete and announce contract and refund
transactions.
| Method Detail |
|---|
@Nullable public static StoredPaymentChannelClientStates getFromWallet(Wallet wallet)
public BigInteger getBalanceForServer(Sha256Hash id)
public long getSecondsUntilExpiry(Sha256Hash id)
public String getWalletExtensionID()
WalletExtension
getWalletExtensionID in interface WalletExtensionpublic boolean isWalletExtensionMandatory()
WalletExtension
isWalletExtensionMandatory in interface WalletExtensionpublic byte[] serializeWalletExtension()
WalletExtension
serializeWalletExtension in interface WalletExtension
public void deserializeWalletExtension(Wallet containingWallet,
byte[] data)
throws Exception
WalletExtension
deserializeWalletExtension in interface WalletExtensionExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||