All Packages Class Hierarchy This Package Previous Next Index
Class semper.payment.AccountBasedPurse
java.lang.Object
|
+----semper.payment.Purse
|
+----semper.payment.AccountBasedPurse
- public abstract class AccountBasedPurse
- extends Purse
- implements Serializable
Generic representation of an account based payment system
- Version:
- $Revision: 1.9 $ $Date: 1998/03/12 10:53:01 $
- Author:
- N. Asokan ([email protected])
- See Also:
- Purse
-
AccountBasedPurse()
-
-
doPurseOp(TinguinSession, String)
- Perform a special purse operation.
-
getAmountFromBank()
- Get the amount (balance) in our bank account.
-
getPurseOpsList()
- Returns a vector containing names of supported special purse
operations.
AccountBasedPurse
public AccountBasedPurse()
getAmountFromBank
public Amount getAmountFromBank() throws AmountNotApplicable, PaymentServiceException
- Get the amount (balance) in our bank account. The value of the
amount can be positive or negative, the latter indicating money
owed. This makes sense only for account-based payment systems.
The amount is retrieved by asking the bank that maintains the
account.
Contrast this with the
getAmount()
method which
returns the amount according to the local state of the purse.
This method may have the side-effect of updating the local
balance (maintained as part of the local state) of the purse.
- Returns:
- amount according to the bank account
- Throws: AmountNotApplicable
- in those systems where it is not
possible to check the bank balance
- Throws: PaymentServiceException
- for other miscellaneous errors
- See Also:
- getAmount
getPurseOpsList
public Vector getPurseOpsList()
- Returns a vector containing names of supported special purse
operations. These names will be used by the purse management
application to present a menu to the user. It is important that
doPurseOps
knows about all the commands defined by
this method.
- Used-by: PurseManagement
- Returns:
- Vector containing names of operations
- Overrides:
- getPurseOpsList in class Purse
- See Also:
- doPurseOp
doPurseOp
public boolean doPurseOp(TinguinSession dis,
String cmd) throws PaymentServiceException
- Perform a special purse operation.
- Parameters:
- cmd - name of the operation; this must be one of the strings
returned by
getPurseOpsList
method. It is important
that this method knows about all the operations defined by the
getPurseOpsList
method. If we do not understand the
requested operation, we pass it up.
- Used-by: PurseManagement
- a - tinguin session
- Returns:
- true/false: if we return true, the user will be presented again
with the list of operations from
getPurseOpsList
; if we
return false, the user will be returned to the main purse management menu.
- Throws: PaymentServiceException
- if the operation cannot be performed
- Overrides:
- doPurseOp in class Purse
- See Also:
- getPurseOpsList
All Packages Class Hierarchy This Package Previous Next Index