|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--webfunds.sox.Encodable
|
+--webfunds.sox.SubAccount
|
+--webfunds.sox.ValueAccount
ValueAccount does SOX standard transactions such as deposit. This is the class to emulate if you wish to extend SOX request types.
| Field Summary | |
static byte[] |
CANCEL_DESC
|
| Fields inherited from class webfunds.sox.SubAccount |
acct,
ACTIVE,
FROZEN,
issuer,
itemId,
NEW,
REGISTERED,
reqNo,
RETRY,
status |
| Constructor Summary | |
ValueAccount(byte[] d)
|
|
ValueAccount(java.io.InputStream is)
|
|
ValueAccount(ItemId it)
Create a new ValueAccount object. |
|
| Method Summary | |
MailItem[] |
cancel(Payment payment)
Cancel this payment. |
MailItem[] |
cancel(java.lang.String paymentid)
Cancel a payment that had a particular id. |
protected MailItem[] |
cancelFromPayment(Payment cancel)
Cancel using the payment supplied. |
Payment |
createPayment(AccountId target,
long qty,
byte[] desc,
boolean changekey,
long from,
long till,
java.lang.String pid)
Create a payment, with all params specified. |
Payment |
createPayment(AccountId target,
long qty,
byte[] desc,
long validity)
Create a payment valid from now (for how long specified) |
Payment |
createPayment(AccountId target,
long qty,
byte[] desc,
long from,
long validity)
Create a payment, valid from when specified and for how long specified |
Payment |
createPayment(AccountId target,
long qty,
java.lang.String desc)
Create a payment valid from now for next 5 days. |
TokenPayment |
createTokenPayment(Token[] tokens,
byte[] desc,
java.lang.String pid)
Create a proto token payment. |
MailItem[] |
deposit(AbstractPayment payment,
java.lang.String desc,
java.lang.String did)
Deposit a payment. |
protected MailItem[] |
doCancelGetMail(DepositRequest req)
Do the cancel and look at the error. |
protected DepositReply |
doDeposit(DepositRequest req)
Sort out exceptions. |
protected MailItem[] |
doDepositGetMail(DepositRequest req,
boolean retry,
boolean myDID)
Convert the deposit request into a receipt. |
static ValueAccount |
example()
|
static void |
main(java.lang.String[] args)
|
protected static void |
tryit(ValueAccount p)
|
MailItem[] |
withdraw(AbstractPayment payment,
AbstractPayment proto,
java.lang.String desc,
java.lang.String did)
Withdraw a payment, paying with another payment. |
| Methods inherited from class webfunds.sox.SubAccount |
adjustTime,
adjustTime,
checkFrozen,
checkNet,
decode,
delete,
doRequest,
doRequest,
encode,
equals,
fp,
freeze,
getAccount,
getIssuer,
getItemId,
getStatus,
init,
isActive,
isFrozen,
isNew,
isRegistered,
isRetry,
logmsg,
nym,
register,
requestExtra,
setAccount,
setIssuer,
toString,
update |
| Methods inherited from class webfunds.sox.Encodable |
decode,
encode,
readByteArray,
readCertificate,
readProperties,
readString,
writeByteArray,
writeCertificate,
writeProperties,
writeString |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
public static final byte[] CANCEL_DESC
| Constructor Detail |
public ValueAccount(ItemId it)
acct - the account that holds authentication keysitemid - the identifier for this subaccount
public ValueAccount(byte[] d)
throws SOXPacketException
public ValueAccount(java.io.InputStream is)
throws SOXPacketException
| Method Detail |
public MailItem[] deposit(AbstractPayment payment,
java.lang.String desc,
java.lang.String did)
throws SOXSubAccountException,
SOXLaterException,
SOXKeyException,
SOXArgsException,
SOXDepositException
payment - to depositdesc - is binary descriptiondid - is a suggested idempotent Id to use, ignore if invalid
public MailItem[] withdraw(AbstractPayment payment,
AbstractPayment proto,
java.lang.String desc,
java.lang.String did)
throws SOXSubAccountException,
SOXLaterException,
SOXKeyException,
SOXArgsException,
SOXDepositException
payment - that pays for proto withdrawalproto - is the tokens for signingdesc - is a binary descriptiondid - is a suggested idempotent Id to use, ignore if invalid
protected MailItem[] doDepositGetMail(DepositRequest req,
boolean retry,
boolean myDID)
throws SOXSubAccountException,
SOXDepositException,
SOXLaterException,
SOXKeyException
retry - true if this call is recursivemyDID - true if DID locally generated (and should be perfect)
protected DepositReply doDeposit(DepositRequest req)
throws SOXSubAccountException,
SOXLaterException
public MailItem[] cancel(java.lang.String paymentid)
throws SOXSubAccountException,
SOXLaterException,
SOXKeyException,
SOXDepositException
public MailItem[] cancel(Payment payment)
throws SOXSubAccountException,
SOXLaterException,
SOXKeyException,
SOXDepositException
payment - the previously signed payment to cancel
protected MailItem[] cancelFromPayment(Payment cancel)
throws SOXSubAccountException,
SOXLaterException,
SOXKeyException,
SOXDepositException
payment - the previously signed payment to cancel
protected MailItem[] doCancelGetMail(DepositRequest req)
throws SOXSubAccountException,
SOXDepositException,
SOXLaterException
public Payment createPayment(AccountId target,
long qty,
java.lang.String desc)
throws SOXSubAccountException
target - the target accountqty - the number of items of which the payment is fordesc - a description of what this payment is for (optional)
//@param boolean wether or not the payment is a rollover payment
public Payment createPayment(AccountId target,
long qty,
byte[] desc,
long validity)
throws SOXSubAccountException
target - the target accountqty - the number of items of which the payment is fordesc - a description of what this payment is for (optional)
//@param boolean wether or not the payment is a rollover paymentvalidity - the payment is valid for validity seconds (from now)
public Payment createPayment(AccountId target,
long qty,
byte[] desc,
long from,
long validity)
throws SOXSubAccountException
target - the target accountqty - the number of items of which the payment is fordesc - a description of what this payment is for (optional)
//@param boolean wether or not the payment is a rollover paymentvalidFrom - the time from which the payment is validvalidity - the time in seconds for which the payment is valid
public Payment createPayment(AccountId target,
long qty,
byte[] desc,
boolean changekey,
long from,
long till,
java.lang.String pid)
throws SOXSubAccountException
target - the target accountqty - the number of items of which the payment is fordesc - a description of what this payment is for (optional)boolean - whether or not the payment is a rollover paymentfrom - the time from which the payment is validtill - the time till which the payment is validpid - a unique payment identifier, replaced if empty
public TokenPayment createTokenPayment(Token[] tokens,
byte[] desc,
java.lang.String pid)
throws SOXSubAccountException
tokens - the individual tokens or coins that need withdrawingdesc - a description of what this payment is for (optional)pid - a unique payment identifier, replaced if emptypublic static ValueAccount example()
public static void main(java.lang.String[] args)
protected static void tryit(ValueAccount p)
throws java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||