Class semper.payment.generic.genericPurse
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.generic.genericPurse

java.lang.Object
   |
   +----semper.payment.Purse
           |
           +----semper.payment.AccountBasedPurse
                   |
                   +----semper.payment.generic.genericPurse

public class genericPurse
extends AccountBasedPurse
implements Streamable
Generic Purse - part of the adapter for the "Generic" payment module
Version:
$Revision: 1.19 $ $Date: 1996/08/20 12:04:22 $
Author:
Jose-Luis Abad-Peiro (jla@zurich.ibm.com)
See Also:
genericTransaction

Constructor Index

 o genericPurse()
Constructor
 o genericPurse(String, PaymentEntity, PaymentEntity)
Constructor

Method Index

 o getAccountNumber()
Get the account number
 o getAmount()
Get the current amount in the purse Implemented from abstract method defined in Purse
 o getPaymentSystemName()
Get the Payment System Name which is represented by this purse Access to the attribute _paymentSystemName.
 o getPurseAddress()
We override getPurseAddress() so that it always contains the current host address.
 o getUnlockedAmount()
Get the unlocked amount Implemented from abstract method defined in Purse
 o init()
Initialise.
 o isCurrencySupported(Currency)
Check if a given currency is supported Implemented from abstract method defined in Purse
 o isSecurityServiceOffered(SecurityOption)
Check if a specific security service is offered Implemented from abstract method defined in Purse
 o myStreamSize()
Implementing the Streamable interface
 o offeredSecurityServices()
Get the list of security services offered Implemented from abstract method defined in Purse
 o readObject(StreamInputInterface)
Implementing the Streamable interface
 o registerWithBank()
Register or re-register a purse _with_the_bank_.
 o setUnlockedAmount(Amount)
Set the unlocked amount Implemented from abstract method defined in Purse
 o setup(TinguinDisplay)
Setup the purse.
 o startTransaction()
Starts a new Transaction.
 o supportedCurrency()
Return the list of supported currencies Implemented from abstract method defined in Purse
 o writeObject(StreamOutputInterface)
Implementing the Streamable interface

Constructors

 o genericPurse
  public genericPurse()
Constructor
 o genericPurse
  public genericPurse(String purse_name,
                      PaymentEntity bank,
                      PaymentEntity address)
Constructor

Methods

 o startTransaction
  public PaymentTransaction startTransaction() throws PaymentServiceException
Starts a new Transaction. The invoker of this method should explicitly cast the returned object to genericTransaction
Throws: PaymentServiceException
if a transaction cannot be started.
Overrides:
startTransaction in class Purse
See Also:
startTransaction
 o getPaymentSystemName
  public String getPaymentSystemName()
Get the Payment System Name which is represented by this purse Access to the attribute _paymentSystemName. Overriding default method defined in Purse.java The first part of the payment system name is a static class-wide constant that is unique to a payment system (GENERIC). The second part is the brand name (e.g. EuroCard).
Overrides:
getPaymentSystemName in class Purse
See Also:
getPaymentSystemName
 o registerWithBank
  public void registerWithBank() throws PaymentServiceException
Register or re-register a purse _with_the_bank_. Implemented from abstract method defined in Purse
Throws: PaymentServiceException
if registration failed
Overrides:
registerWithBank in class Purse
See Also:
registerWithBank
 o getAccountNumber
  protected String getAccountNumber()
Get the account number
Returns:
string containing the account number for this purse
See Also:
registerWithBank
 o supportedCurrency
  public Vector supportedCurrency()
Return the list of supported currencies Implemented from abstract method defined in Purse
Overrides:
supportedCurrency in class Purse
See Also:
supportedCurrency
 o isCurrencySupported
  public boolean isCurrencySupported(Currency currency)
Check if a given currency is supported Implemented from abstract method defined in Purse
Overrides:
isCurrencySupported in class Purse
See Also:
isCurrencySupported
 o offeredSecurityServices
  public Vector offeredSecurityServices()
Get the list of security services offered Implemented from abstract method defined in Purse
Overrides:
offeredSecurityServices in class Purse
See Also:
offeredSecurityServices
 o isSecurityServiceOffered
  public boolean isSecurityServiceOffered(SecurityOption service)
Check if a specific security service is offered Implemented from abstract method defined in Purse
Overrides:
isSecurityServiceOffered in class Purse
See Also:
isSecurityServiceOffered
 o getAmount
  public Amount getAmount() throws AmountNotApplicable
Get the current amount in the purse Implemented from abstract method defined in Purse
Throws: AmountNotApplicable
always because current amount does not make sense in this system
Overrides:
getAmount in class Purse
See Also:
getAmount
 o setUnlockedAmount
  public synchronized void setUnlockedAmount(Amount amount)
Set the unlocked amount Implemented from abstract method defined in Purse
Overrides:
setUnlockedAmount in class Purse
See Also:
setUnlockedAmount
 o getUnlockedAmount
  public Amount getUnlockedAmount()
Get the unlocked amount Implemented from abstract method defined in Purse
Overrides:
getUnlockedAmount in class Purse
See Also:
getUnlockedAmount
 o getPurseAddress
  public PaymentEntity getPurseAddress()
We override getPurseAddress() so that it always contains the current host address. TODO: Check if this is a reasonable thing to do
Returns:
PaymentEntity object indicating the address
Overrides:
getPurseAddress in class Purse
 o init
  public synchronized void init() throws PaymentServiceException
Initialise. The following actions are currently taken:
  • Register a place to receive payments
  • [tbd] read in preferences (initialise with defaults if needed)
    Throws: PaymentServiceException
    on init failure
    Overrides:
    init in class Purse
  •  o setup
      public void setup(TinguinDisplay dis) throws PaymentServiceException
    
    Setup the purse. We have the option of entirely re-writing setup() or trying to provide additional services to those provided by the base class. We'll do the latter.
    Parameters:
    dis - an active Tinguin session
    Returns:
    nothing
    Throws: PaymentServiceException
    on misc. errors
    Overrides:
    setup in class Purse
    See Also:
    setup
     o writeObject
      public void writeObject(StreamOutputInterface s) throws StreamIOException
    
    Implementing the Streamable interface
    Throws: StreamIOException
    as usual
    Overrides:
    writeObject in class Purse
     o readObject
      public void readObject(StreamInputInterface s) throws StreamIOException
    
    Implementing the Streamable interface
    Throws: StreamIOException
    as usual
    Overrides:
    readObject in class Purse
     o myStreamSize
      public int myStreamSize() throws StreamIOException
    
    Implementing the Streamable interface
    Overrides:
    myStreamSize in class Purse

    All Packages  Class Hierarchy  This Package  Previous  Next  Index