|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.server.workshop.WorkerObject
org.elkoserver.server.workshop.bank.BankWorker
public class BankWorker
Workshop worker object for the bank service.
| Constructor Summary | |
|---|---|
BankWorker(OptString serviceName,
String bankRef)
JSON-driven constructor. |
|
| Method Summary | |
|---|---|
void |
activate()
Activate the bank service. |
void |
cancelkey(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String cancel)
Message handler for the 'cancelkey' request: invalidate an existing key. |
void |
deleteaccount(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String account)
Message handler for the 'deleteaccount' request: destroy an account. |
void |
dupkey(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
OptString optExpires)
Message handler for the 'dupkey' request: make a separately cancellable copy of an existing key. |
void |
encumber(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String src,
int amount,
String expiresStr)
Message handler for the 'encumber' request: reserve money in an account for a future transaction. |
void |
freezeaccount(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String account)
Message handler for the 'freezeaccount' request: block an account from participating in transactions. |
void |
issuerootkey(WorkshopActor from,
OptString xid,
OptString rep,
OptString memo)
Message handler for the 'issuerootkey' request: obtain the bank's root key for the first time. |
void |
makeaccounts(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String[] currs,
String owner)
Message handler for the 'makeaccounts' request: create new accounts. |
void |
makecurrency(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String curr)
Message handler for the 'makecurrency' request: create a new currency. |
void |
makekey(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String auth,
String[] currs,
OptString optExpires)
Message handler for the 'makekey' request: create a new key. |
void |
mint(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String dst,
int amount)
Message handler for the 'mint' request: create money and deposit it in an account. |
void |
queryaccounts(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String[] accounts,
OptBoolean encs)
Message handler for the 'queryaccounts' request: obtain information about one or more accounts. |
void |
querycurrencies(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo)
Message handler for the 'querycurrencies' request: obtain information about existing currencies. |
void |
queryenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String encRef)
Message handler for the 'queryenc' request: obtain information about an encumbrance. |
void |
releaseenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String encRef)
Message handler for the 'releaseenc' request: release an encumbrance on an account, making the funds once again available to the account owner. |
void |
unfreezeaccount(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String account)
Message handler for the 'unfreezeaccount' request: remove the blockage on a previously frozen account. |
void |
unmint(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String src,
int amount)
Message handler for the 'unmint' request: remove money from an account and then destroy it. |
void |
unmintenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String encRef)
Message handler for the 'unmint' request: redeem an encumbrance by destroying the encumbered funds |
void |
xfer(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String src,
String dst,
int amount)
Message handler for the 'xfer' request: transfer money from one account to another. |
void |
xferenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String dst,
String encRef)
Message handler for the 'xferenc' request: redeem an encumbrance by transferring the encumbered funds to some other account |
| Methods inherited from class org.elkoserver.server.workshop.WorkerObject |
|---|
encode, ref, workshop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
@JSONMethod(value={"service","bank"})
public BankWorker(OptString serviceName,
String bankRef)
serviceName - The name by which this worker object will be
addressed. If omitted, it defaults to "bank".bankRef - Reference string for the persistent bank object that
this worker object provides the interface to.| Method Detail |
|---|
public void activate()
activate in class WorkerObject
@JSONMethod(value={"xid","rep","memo"})
public void issuerootkey(WorkshopActor from,
OptString xid,
OptString rep,
OptString memo)
throws MessageHandlerException
from - The sender of the request.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","src","dst","amount"})
public void xfer(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String src,
String dst,
int amount)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.src - Ref of transfer source account.dst - Ref of transfer destination account.amount - Quantity of money to transfer.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","dst","amount"})
public void mint(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String dst,
int amount)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.dst - Ref of destination account for new money.amount - Quantity of money to create.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","src","amount"})
public void unmint(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String src,
int amount)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.src - Ref of the account from which the money should be taken.amount - Quantity of money to destroy.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","src","amount","expires"})
public void encumber(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String src,
int amount,
String expiresStr)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.src - Ref of account whose funds are to be encumbered.amount - Quantity of money to encumber.expiresStr - Date after which the encumbrance will be released.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","enc"})
public void releaseenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String encRef)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.encRef - Ref of the encumbrance to release.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","dst","enc"})
public void xferenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String dst,
String encRef)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.dst - Ref of transfer destination account.encRef - Ref of the encumbrance that will be the source of funds.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","enc"})
public void unmintenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String encRef)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.encRef - Ref of the encumbrance that will be the source of funds.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","enc"})
public void queryenc(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String encRef)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.encRef - Ref of the encumbrance that is of interest.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","currs","owner"})
public void makeaccounts(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String[] currs,
String owner)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.currs - Currencies in which the new accounts will be denominated.owner - Ref of the user who is to be the owner of the new account.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","account"})
public void deleteaccount(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String account)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.account - Ref of the account that is to be deleted.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","accounts","encs"})
public void queryaccounts(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String[] accounts,
OptBoolean encs)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.accounts - Refs of the accounts of interestencs - Flag that is true if reply should include encumbrance info.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","account"})
public void freezeaccount(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String account)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.account - Ref of the account to be frozen.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","account"})
public void unfreezeaccount(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String account)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optional reference to client object to reply to.memo - Transaction annotation, for logging.account - Ref of the account to be unfrozen.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","curr"})
public void makecurrency(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String curr)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.curr - Name for the new currency.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo"})
public void querycurrencies(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","auth","currs","expires"})
public void makekey(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String auth,
String[] currs,
OptString optExpires)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.auth - The desired authority of the new key.currs - Optional currencies scoping the new key.optExpires - Date after which the new key will become invalid.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","cancel"})
public void cancelkey(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
String cancel)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access.xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.cancel - Ref of the key to be cancelled.
MessageHandlerException
@JSONMethod(value={"key","xid","rep","memo","expires"})
public void dupkey(WorkshopActor from,
String key,
OptString xid,
OptString rep,
OptString memo,
OptString optExpires)
throws MessageHandlerException
from - The sender of the request.key - Key from authorizing access (which will be copied).xid - Optional client-side response tag.rep - Optioanl reference to client object to reply to.memo - Transaction annotation, for logging.optExpires - Date after which the new key will become invalid.
MessageHandlerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||