All Packages Class Hierarchy This Package Previous Next Index
Class semper.payment.PaymentTransaction
java.lang.Object
|
+----semper.payment.PaymentTransaction
- public abstract class PaymentTransaction
- extends Object
- implements PurseServices, Serializable
Class for the primary objects implementing payment services
PaymentTransaction is the primary object in the payment service
blocks for carrying out transactions. Each active transaction
corresponds to a PaymentTransaction object.
The payment manager has a list of all active transactions. The constructor
of each PaymentTransaction object is responsible for notifying the payment
manager of its creation.
Each PaymentTransaction object creates a PaymentTransactionRecord
object. At the end of the transaction or at the end of a session
(even if the transaction is unfinished), the
PaymentTransaction object is removed while the
PaymentTransactionRecord is not. They stay
in the archive for a longer term.
The adapter of a new payment system Xyz will define XyzTransaction as
a subclass of this class. So for now, we'll leave it as an
abstract class. In case we need transaction records for non-purse
transactions (e.g. payment manager transactions) in the payment service
block, we'll later make it non-abstract.
- Version:
- $Revision: 1.12 $ $Date: 1997/10/23 16:21:04 $
- Author:
- N. Asokan ([email protected])
- See Also:
- PaymentManager, PaymentTransactionRecord
-
PaymentTransaction()
-
-
abort()
- Abort the current transaction, if possible.
-
endTransaction()
- Mark a transaction as 'completed'.
-
finalize()
-
-
getState()
- Return the state of the Transaction.
-
getTransactionRecord()
- Return a reference to the PaymentTransactionRecord associated
with this Transaction.
-
pay(PaymentEntity, Amount, Vector, String)
- Move specified amount from payer to payee.
-
pay(PaymentEntity, Amount, Vector, String[])
- Depracated (will be removed shortly)
-
receivePayment(PaymentEntity, Amount, Vector, String)
- Accept incoming payment from a payer.
-
receivePayment(PaymentEntity, Amount, Vector, String[])
- Depracated (will be removed shortly)
-
reversePayment(PaymentTransactionRecord)
- Request reversal of a previously made payment.
-
reverseReceivedPayment(PaymentTransactionRecord)
- Process request for reversing a previously received payment.
-
suspendTransaction()
- Suspend a transaction.
PaymentTransaction
public PaymentTransaction()
abort
public abstract void abort() throws CouldNotAbort
- Abort the current transaction, if possible.
- Throws: CouldNotAbort
- if abortion is no longer possible
getState
public abstract PaymentTransactionState getState()
- Return the state of the Transaction.
getTransactionRecord
public abstract PaymentTransactionRecord getTransactionRecord()
- Return a reference to the PaymentTransactionRecord associated
with this Transaction.
- Returns:
- PaymentTransactionRecord object corresponding to
this transaction
- See Also:
- PaymentTransactionRecord
suspendTransaction
public PaymentTransactionRecord suspendTransaction() throws PaymentServiceException
- Suspend a transaction.
- Returns:
- payment transaction record for this transaction
- Throws: PaymentServiceException
- if suspension failed
- See Also:
- resumeTransaction, startTransaction
endTransaction
public PaymentTransactionRecord endTransaction() throws PaymentServiceException
- Mark a transaction as 'completed'.
- Returns:
- a reference to the payment transaction record of this transaction.
- Throws: PaymentServiceException
- if it was not possible to mark this
transaction as ended.
- See Also:
- endTransaction
finalize
protected void finalize() throws IOException
- Overrides:
- finalize in class Object
pay
public void pay(PaymentEntity payee,
Amount amount,
Vector options,
String a_ext_ref[]) throws PaymentServiceException
- Depracated (will be removed shortly)
- Throws: PaymentServiceException
- as in above
- See Also:
- pay
receivePayment
public void receivePayment(PaymentEntity payer,
Amount amount,
Vector options,
String a_ext_ref[]) throws PaymentServiceException
- Depracated (will be removed shortly)
- Throws: PaymentServiceException
- as in above
- See Also:
- receivePayment
All Packages Class Hierarchy This Package Previous Next Index