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

Class semper.payment.PaymentTransactionState

java.lang.Object
   |
   +----semper.payment.PaymentTransactionState

public class PaymentTransactionState
extends Object
implements Streamable
Description of service types. Objects of this class are used to identify a specific state of a payment transaction. Typically, adapters are expected to instantiate state objects as objects of a subclass of this class. This class provides various standard state values as constants (e.g. TS_INITIATED). The intent is that once a state object has been created, the setState method will be used to set the state based on one of these pre-defined constants.
Version:
$Revision: 1.4 $ $Date: 1997/01/27 12:15:24 $
Author:
N. Asokan ([email protected])
See Also:
PurseServices, AccountBasedTransactionState, CashLikeTransactionState

Variable Index

 o TS_CANCELLED
Top level payment transaction state: cancelled
 o TS_FAILED
Top level payment transaction state: FAILED
 o TS_INITIATED
Top level payment transaction state: initiated
 o TS_SUCCEEDED
Top level payment transaction state: succeeded
 o TS_UNKNOWN
Top level payment transaction state: nknown

Constructor Index

 o PaymentTransactionState()
Constructor without arguments for serializer

Method Index

 o equals(Object)
We override equals to suit our needs: if the input parameter can not be cast into our own class, we return false.
 o hashCode()
We override hashCode
 o myStreamSize()
Implementing the Streamable interface
 o readObject(StreamInputInterface)
Implementing the Streamable interface
 o setState(PaymentTransactionState)
Set the state of the transaction to be the same as the state specified in the input parameter.
 o toString()
redefine toString
 o writeObject(StreamOutputInterface)
Implementing the Streamable interface

Variables

 o TS_UNKNOWN
  public final static PaymentTransactionState TS_UNKNOWN
Top level payment transaction state: nknown
 o TS_INITIATED
  public final static PaymentTransactionState TS_INITIATED
Top level payment transaction state: initiated
 o TS_SUCCEEDED
  public final static PaymentTransactionState TS_SUCCEEDED
Top level payment transaction state: succeeded
 o TS_FAILED
  public final static PaymentTransactionState TS_FAILED
Top level payment transaction state: FAILED
 o TS_CANCELLED
  public final static PaymentTransactionState TS_CANCELLED
Top level payment transaction state: cancelled

Constructors

 o PaymentTransactionState
  public PaymentTransactionState()
Constructor without arguments for serializer

Methods

 o setState
  public void setState(PaymentTransactionState ts)
Set the state of the transaction to be the same as the state specified in the input parameter. The intention is to use the various pre-defined constants (i.e. the TS_ objects) as the input parameter.
Parameters:
ts - a PaymentTransaction state object
Returns:
nothing
 o toString
  public String toString()
redefine toString
Returns:
a string describing this service
Overrides:
toString in class Object
 o equals
  public boolean equals(Object o)
We override equals to suit our needs: if the input parameter can not be cast into our own class, we return false. Otherwise, if the internal integer codes are not the same, we return false. Otherwise we return true.
Returns:
true if objects are equal; false otherwise
Overrides:
equals in class Object
See Also:
equals
 o hashCode
  public int hashCode()
We override hashCode
Returns:
integer hashcode
Overrides:
hashCode in class Object
See Also:
hashCode
 o writeObject
  public void writeObject(StreamOutputInterface s) throws StreamIOException
Implementing the Streamable interface
Throws: StreamIOException
as usual
 o readObject
  public void readObject(StreamInputInterface s) throws StreamIOException
Implementing the Streamable interface
Throws: StreamIOException
as usual
 o myStreamSize
  public int myStreamSize() throws StreamIOException
Implementing the Streamable interface

All Packages  Class Hierarchy  This Package  Previous  Next  Index