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

Class semper.payment.TokenCapsule

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

public class TokenCapsule
extends Object
This class defines the capsule (containing a token) given as input to and received as output from the various methods in the token-based API for payment services. In addition to the token itself, the capsule contains the following information which can be accessed and interpreted by the invokers of token-based services: See the TPurseServices interface for more information on how the TokenCapsule objects are to be used.
Version:
$Revision: 1.5 $ $Date: 1997/01/27 12:15:28 $
Author:
N. Asokan ([email protected])
See Also:
TPurseServices

Variable Index

 o E_DEFECTIVE_TOKEN
Error flag
 o E_REPLAYED_TOKEN
Error flag
 o E_UNEXPECTED_TOKEN
Error flag
 o S_COMPLETE
Status flag for a protocol run: protocol run is complete
 o S_CONTINUE_NEEDED
Status flag for a protocol run: input of a token expected in the next message of this protocol run.
 o S_NONE
status flag for a protocol run: no status

Constructor Index

 o TokenCapsule()
Empty constructor for serialization
 o TokenCapsule(Object, PaymentEntity, Vector, String)
Constructor

Method Index

 o getExtRef()
Retrieve the external reference string from the token capsule.
 o getOriginator()
Get the originator of a token
 o getRecepients()
Get a copy of the list of recipients
 o getToken()
Retrieve the token from the token capsule.
 o getTokenStatus()
Retrieve the status from a capsule.
 o setExtRef(String)
Set the external reference string from the token capsule.
 o setOriginator(PaymentEntity)
Set the originator identity
 o setRecepients(Vector)
Set the list of recipients
 o setToken(Object)
Set the token in the token capsule.
 o setTokenStatus(int)
Set the status value in a capsule.

Variables

 o S_NONE
  public final static int S_NONE
status flag for a protocol run: no status
 o S_CONTINUE_NEEDED
  public final static int S_CONTINUE_NEEDED
Status flag for a protocol run: input of a token expected in the next message of this protocol run.
 o S_COMPLETE
  public final static int S_COMPLETE
Status flag for a protocol run: protocol run is complete
 o E_DEFECTIVE_TOKEN
  public final static int E_DEFECTIVE_TOKEN
Error flag
 o E_REPLAYED_TOKEN
  public final static int E_REPLAYED_TOKEN
Error flag
 o E_UNEXPECTED_TOKEN
  public final static int E_UNEXPECTED_TOKEN
Error flag

Constructors

 o TokenCapsule
  public TokenCapsule()
Empty constructor for serialization
 o TokenCapsule
  public TokenCapsule(Object token,
                      PaymentEntity originator,
                      Vector recepients,
                      String extref)
Constructor
Parameters:
token - Token object
originator - Originator of the token
recipients - Recepients of the token (Vector of PaymentEntity objects)
extref - External reference string of the transaction as part of which the token was created

Methods

 o getTokenStatus
  public int getTokenStatus()
Retrieve the status from a capsule. Status can take either a token status value (e.g. S_CONTINUE_NEEDED) or an error status value (e.g. E_UNEXPECTED_TOKEN).
Returns:
status value
 o setTokenStatus
  public synchronized void setTokenStatus(int status)
Set the status value in a capsule. Status can take either a token status value (e.g. S_CONTINUE_NEEDED) or an error status value (e.g. E_UNEXPECTED_TOKEN).
Parameters:
status - status value
Returns:
nothing
 o getExtRef
  public String getExtRef()
Retrieve the external reference string from the token capsule.
Returns:
external reference string
 o setExtRef
  public synchronized void setExtRef(String ext_ref)
Set the external reference string from the token capsule.
Parameters:
ext_ref - external reference string
 o getToken
  public Object getToken()
Retrieve the token from the token capsule. For now, we'll allow the token to be any Object.
Returns:
token object
 o setToken
  public synchronized void setToken(Object token)
Set the token in the token capsule.
Parameters:
token - the token object
 o getRecepients
  public Vector getRecepients()
Get a copy of the list of recipients
Returns:
a Vector of PaymentEntity objects
See Also:
PaymentEntity
 o setRecepients
  public synchronized void setRecepients(Vector recepients)
Set the list of recipients
Parameters:
recepients - Vector of PaymentEntity objects indicating the list of recepients
 o getOriginator
  public PaymentEntity getOriginator()
Get the originator of a token
Returns:
PaymentEntity originator identity
 o setOriginator
  public synchronized void setOriginator(PaymentEntity originator)
Set the originator identity
Parameters:
originator - PaymentEntity object indicating the originator

All Packages  Class Hierarchy  This Package  Previous  Next  Index