Class semper.payment.PurseReference
All Packages Class Hierarchy This Package Previous Next Index
Class semper.payment.PurseReference
java.lang.Object
|
+----semper.payment.PurseReference
- public class PurseReference
- extends Object
- implements Streamable
A unified reference to a purse object. Different entities in the
payment block keep references to the same Purse object
(e.g. PaymentManager, PaymentTransactionRecord objects etc.). Since
these references must be persistent, they cannot be simple object
references. One could keep the archive handle (AccessName) as the
reference. But the Archive does not (yet) guarantee that each
archive object will be instantiated exactly once. This class
attempts to provide a persistent, unified way of referring to a
Purse object.
- Version:
- $Revision: 1.15 $ $Date: 1997/01/27 12:15:27 $
- Author:
- N. Asokan ([email protected])
- See Also:
- Purse, AccessName
-
PurseReference()
- Constructor without args
-
PurseReference(String)
-
-
PurseReference(String, Purse, AccessName)
-
-
getHandle()
- Get the archive handle of this purse.
-
getName()
- Get the purse name.
-
getPurse()
- Get the object reference of this purse.
-
isActivated()
- Check if the purse is active.
-
myStreamSize()
- Implementing the Streamable interface
-
readObject(StreamInputInterface)
- Implementing the Streamable interface
-
toString()
- rewrite toString() to suit our needs
-
writeObject(StreamOutputInterface)
- Implementing the Streamable interface
PurseReference
public PurseReference(String purse_name,
Purse purse_reference,
AccessName purse_handle)
- Parameters:
- purse_name - distinguished name of a purse
- purse_reference - object reference to this purse
- purse_handle - archive handle of this purse
PurseReference
public PurseReference(String purse_name)
- Parameters:
- purse_name - distinguished name of a purse
PurseReference
public PurseReference()
- Constructor without args
toString
public String toString()
- rewrite toString() to suit our needs
- Returns:
- string describing this object
- Overrides:
- toString in class Object
getPurse
public Purse getPurse() throws PaymentServiceException
- Get the object reference of this purse. If the purse is still in
the archive, it will be retrieved and instantiated. Otherwise,
the reference to the already instantiated object will be returned.
- Returns:
- purse object
- Throws: PaymentServiceException
- if purse retrieval from
archive failed.
- See Also:
- Purse
getName
public String getName()
- Get the purse name. (TODO: just get it from the purse)
- Returns:
- distinguished name of purse
getHandle
public AccessName getHandle()
- Get the archive handle of this purse.
- Returns:
- archive handle of purse
isActivated
public boolean isActivated()
- Check if the purse is active.
- Used-by: Payment Manager while constructing the list of
active purses
- Returns:
- true if the purse is active
- See Also:
- getListOfPurses
writeObject
public void writeObject(StreamOutputInterface s) throws StreamIOException
- Implementing the Streamable interface
- Throws: StreamIOException
- as usual
readObject
public void readObject(StreamInputInterface s) throws StreamIOException
- Implementing the Streamable interface
myStreamSize
public int myStreamSize() throws StreamIOException
- Implementing the Streamable interface
All Packages Class Hierarchy This Package Previous Next Index