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

Class semper.payment.PaymentManager

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

public class PaymentManager
extends Object
Payment manager controller
Version:
$Revision: 1.24 $ $Date: 1996/09/10 17:42:18 $
Author:
N. Asokan (aso@zurich.ibm.com)

Variable Index

 o FREE_CHOICE
Choice type flag to use during payment system selection negotiation: this value makes no restrictions on what the peer can choose.
 o INIT_LEVEL_FULL
Init level indicator: complete
 o INIT_LEVEL_NOT_SERVER
Init level indicator: standlone (no network)
 o OP_TYPE_INCOMING
Flag used in local purse selection: to indicate incoming payment
 o OP_TYPE_OUTGOING
Flag used in local purse selection: to indicate outcoming payment
 o PURSE_LIST_AS_PAYMENT_SYSTEM_NAMES
Return type indicator constant used in getListOfPurses(return_type_indicator) to indicate that a list of payment system names (String) must be returned.
 o PURSE_LIST_AS_PURSE_NAMES
Return type indicator constant used in getListOfPurses(return_type_indicator) to indicate that a list of purse names (String) must be returned.
 o PURSE_LIST_AS_PURSE_REFS
Return type indicator constant used in getListOfPurses(return_type_indicator) to indicate that a list of PurseReference objects must be returned.
 o SELECT_BY_PAYMENT_SYSTEM_NAME
Selector constant used in getListOfPurses(selector, name) to indicate that the second argument indicates a payment system name.
 o SELECT_BY_USER_NAME
Selector constant used in getListOfPurses(selector, name) to indicate that the second argument indicates a user name.
 o SELECT_PS_AND_SET_AMOUNT
Choice type flag to use during payment system selection negotiation: this value makes no restrictions on what the peer can choose.
 o SELECT_PS_ONLY
Choice type flag to use duing payment system selection negotiation: this value allows the peer to select only the payment system name.

Constructor Index

 o PaymentManager()

Method Index

 o choosePS(ComPoint, int, Vector)
Receive a proposed list of payment systems and corresponding amounts from the peer along with a choice_type flag.
 o choosePS(ComPoint, int, Vector, Amount)
Receive a proposed list of payment systems and corresponding amounts from the peer along with a choice_type flag.
 o confirmPurse(ComPoint, int, Amount, Vector, PaymentEntity)
Receive a confirmation request from the peer containing a single payment system and a corresponding amount.
 o confirmPurse(ComPoint, int, Amount, Vector, Vector, PaymentEntity)
Receive a confirmation request from the peer containing a single payment system and a corresponding amount.
 o createPurse(String, String)
Create a new purse and register with the payment manager.
 o deletePurse(String)
The reverse of createPurse: remove it from the payment manager's list.
 o deregisterTransaction(long)
Deregister an active transaction on completion.
 o exchangeCurrency(Amount, Amount, boolean)
Exchange currency.
 o getInitStatus()
Return the initialisation status
 o getListOfKnownPurseClasses()
Extract the names of purse classes that the payment manager knows about.
 o getListOfPurses(int)
Return the list of all purses registered with the manager.
 o getListOfPurses(int, String)
Get the list of purses matching the specified criteria.
 o getListOfPurses(int, String, Vector)
Get the list of purses (from the input list) matching the specified criteria.
 o getListOfPurses(int, Vector)
This method takes a Vector of PurseReference objects as input along a return type indicator.
 o getPurseReference(String)
Get the reference to the named purse.
 o getPurseReference(String, Vector)
Get the reference to the named purse from the specified list of purses.
 o init()
Initialise the static payment manager.
 o init(int)
Init really has multiple levels.
 o isInitialised()
Check the initialisation status
 o registerPurseClassName(String, String)
Tell the payment manager about a new payment module.
 o registerTransaction(PaymentTransaction, String)
Register an active transaction.
 o requestChoiceOfPS(ComPoint, int, Vector)
Propose a list of payment systems and corresponding amounts to the peer and request them to choose a subset of the payment systems.
 o requestChoiceOfPS(ComPoint, int, Vector, Amount)
Propose a list of payment systems and an amount to the peer and request them to choose a subset of the payment systems.
 o requestPurseConfirmation(ComPoint, PurseReference, Amount, PaymentEntity)
Having selected a purse, request confirmation from the peer.
 o requestPurseConfirmation(ComPoint, PurseReference, Vector, PaymentEntity)
Having selected a purse, request confirmation from the peer.
 o selectCandidatePurses(PaymentEntity, String, Amount, int, Vector, Vector, Vector)
Select a purse locally given certain conditions.
 o selectPayingPurse(PaymentEntity, String, Amount, Vector, Vector, Vector, String)
A specific way of selecting a purse for payment.
 o selectPurse(PaymentEntity, int, Amount, Vector, Vector)
Select a single from the input list restricted by the results of negotiations which is also given as input.
 o selectPurse(PaymentEntity, int, Vector)
Select a single from the input list.
 o selectReceivingPurse(PaymentEntity, PaymentEntity, Amount, Vector, Vector, Vector, String)
A specific way of selecting a purse for receiving payment.

Variables

 o INIT_LEVEL_FULL
  public final static int INIT_LEVEL_FULL
Init level indicator: complete
 o INIT_LEVEL_NOT_SERVER
  public final static int INIT_LEVEL_NOT_SERVER
Init level indicator: standlone (no network)
 o PURSE_LIST_AS_PURSE_REFS
  public final static int PURSE_LIST_AS_PURSE_REFS
Return type indicator constant used in getListOfPurses(return_type_indicator) to indicate that a list of PurseReference objects must be returned.
See Also:
getListOfPurses
 o PURSE_LIST_AS_PURSE_NAMES
  public final static int PURSE_LIST_AS_PURSE_NAMES
Return type indicator constant used in getListOfPurses(return_type_indicator) to indicate that a list of purse names (String) must be returned.
See Also:
getListOfPurses
 o PURSE_LIST_AS_PAYMENT_SYSTEM_NAMES
  public final static int PURSE_LIST_AS_PAYMENT_SYSTEM_NAMES
Return type indicator constant used in getListOfPurses(return_type_indicator) to indicate that a list of payment system names (String) must be returned.
See Also:
getListOfPurses
 o SELECT_BY_USER_NAME
  public final static int SELECT_BY_USER_NAME
Selector constant used in getListOfPurses(selector, name) to indicate that the second argument indicates a user name.
See Also:
getListOfPurses
 o SELECT_BY_PAYMENT_SYSTEM_NAME
  public final static int SELECT_BY_PAYMENT_SYSTEM_NAME
Selector constant used in getListOfPurses(selector, name) to indicate that the second argument indicates a payment system name.
See Also:
getListOfPurses
 o OP_TYPE_INCOMING
  public final static int OP_TYPE_INCOMING
Flag used in local purse selection: to indicate incoming payment
See Also:
selectCandidatePurses, selectPurse, selectPurse
 o OP_TYPE_OUTGOING
  public final static int OP_TYPE_OUTGOING
Flag used in local purse selection: to indicate outcoming payment
See Also:
selectCandidatePurses, selectPurse, selectPurse
 o FREE_CHOICE
  public final static int FREE_CHOICE
Choice type flag to use during payment system selection negotiation: this value makes no restrictions on what the peer can choose.
See Also:
requestChoiceOfPS, choosePS
 o SELECT_PS_AND_SET_AMOUNT
  public final static int SELECT_PS_AND_SET_AMOUNT
Choice type flag to use during payment system selection negotiation: this value makes no restrictions on what the peer can choose.
See Also:
requestChoiceOfPS, choosePS
 o SELECT_PS_ONLY
  public final static int SELECT_PS_ONLY
Choice type flag to use duing payment system selection negotiation: this value allows the peer to select only the payment system name.
See Also:
requestChoiceOfPS, choosePS

Constructors

 o PaymentManager
  public PaymentManager()

Methods

 o init
  public static void init() throws PaymentServiceException
Initialise the static payment manager. The payment manager is a static entity -- i.e. it is never instantiated. The initialise() method is invoked during startup. It should do whatever is necessary to initialise the various internal variables of the manager. This may involve retrieving a specific state object (with a hard-wired access name) from the archive and reading in status values from it and querying the preferences manager. Currently, the following actions are taken:
  • register an address with the comm. manager for negotiations
    Returns:
    nothing
    Throws: PaymentServiceException
    if initialisation failed
  •  o init
      public static void init(int init_level) throws PaymentServiceException
    
    Init really has multiple levels. This version takes the level as argument.
    Parameters:
    init_level - level of initialisation
    Returns:
    nothing
    Throws: PaymentServiceException
    on misc errors
     o getInitStatus
      public static int getInitStatus()
    
    Return the initialisation status
    Returns:
    initialisation status (0 = not initialised)
     o isInitialised
      public boolean isInitialised()
    
    Check the initialisation status
    Returns:
    false if completely uninitialised; true otherwise
     o exchangeCurrency
      public static void exchangeCurrency(Amount from,
                                          Amount to,
                                          boolean change_from)
    
    Exchange currency. The source and destination currencies are specified as part of the the respective amount objects. One of the amount fields should be Not Implemented Yet.
    Parameters:
    from - source amount
    from - destination amount
    change_from - flag if true, the amount specified in source should be converted; otherwise, amount specified in destination should be converted.
    Returns:
    nothing
     o getListOfPurses
      public static Vector getListOfPurses(int return_type_indicator) throws PaymentServiceException
    
    Return the list of all purses registered with the manager.
    Parameters:
    return_type_indicator - flag indicating the type of items to be returned (can be one of: PurseReference, purse name, or payment system name.)
    Returns:
    Vector representing list of purses (type of elements in the vector depends on the return_type_indicator)
    Throws: PaymentServiceException
    for misc. errors
    See Also:
    PurseReference, Purse, getListOfPurses
     o getListOfPurses
      public static Vector getListOfPurses(int return_type_indicator,
                                           Vector purserefs) throws PaymentServiceException
    
    This method takes a Vector of PurseReference objects as input along a return type indicator. Depending on the latter, it returns a Vector of objects that describe the original list in different ways.
    Parameters:
    return_type_indicator - flag indicating the type of items to be returned (can be one of: PurseReference, purse name, or payment system name.)
    Returns:
    Vector representing list of purses (type of elements in the vector depends on the return_type_indicator)
    Throws: PaymentServiceException
    for misc. errors
    See Also:
    PurseReference, Purse
     o getListOfPurses
      public static Vector getListOfPurses(int selector,
                                           String name) throws PaymentServiceException
    
    Get the list of purses matching the specified criteria. The criteria can be one of:
  • Payment System name (SELECT_BY_USER_NAME)
  • User name (not supported yet) (SELECT_BY_PAYMENT_SYSTEM_NAME)
    Parameters:
    selector - flag describing the selector
    name - value of the selector parameter
    Returns:
    a list of PurseReference objects
    Throws: PaymentServiceException
    on misc errors
    See Also:
    getListOfPurses
  •  o getListOfPurses
      public static Vector getListOfPurses(int selector,
                                           String name,
                                           Vector purse_refs) throws PaymentServiceException
    
    Get the list of purses (from the input list) matching the specified criteria. The criteria can be one of:
  • Payment System name (SELECT_BY_PAYMENT_SYSTEM_NAME)
  • User name (not supported yet) (SELECT_BY_USER_NAME)
    Parameters:
    selector - flag describing the selector
    name - value of the selector parameter
    purse_refs - Vector of PurseReference objects
    Returns:
    a list of PurseReference objects
    Throws: PaymentServiceException
    on misc errors
    See Also:
    PurseReference, getListOfPurses
  •  o getPurseReference
      public static PurseReference getPurseReference(String purse_name)
    
    Get the reference to the named purse.
    Parameters:
    purse_name - distinguished name of purse.
    Returns:
    a purse reference object pointing to the specified purse
    See Also:
    getPurseReference
     o getPurseReference
      public static PurseReference getPurseReference(String purse_name,
                                                     Vector purse_refs)
    
    Get the reference to the named purse from the specified list of purses.
    Parameters:
    purse_name - distinguished name of purse.
    purse_refs - Vector containing PurseReference objects.
    Returns:
    a purse reference object pointing to the specified purse
    See Also:
    getPurseReference
     o registerPurseClassName
      public static synchronized void registerPurseClassName(String key,
                                                             String purse_class)
    
    Tell the payment manager about a new payment module. Installation scripts of payment modules should use this method to register their name with the payment manager. This will be used by the PurseManagement class to provide a user interface to create new purses.
    Parameters:
    key - String short form string tag for the payment system
    purse_class - String describing the purse class name
    Returns:
    nothing
     o getListOfKnownPurseClasses
      public static Hashtable getListOfKnownPurseClasses()
    
    Extract the names of purse classes that the payment manager knows about.
    Returns:
    Hashtable containing a list of string pairs
     o createPurse
      public static Purse createPurse(String purse_class_name,
                                      String purse_name) throws AdapterNotFound, PaymentServiceException
    
    Create a new purse and register with the payment manager. When a new payment module is installed, the registerPurse() method of the payment manager with the name of the purse class in the new payment module adapter as argument. Presumably this should be done by a "installer" business application that is delivered with payment module.
    Parameters:
    purse_class_name - name of the purse class (e.g. ikpPurse)
    Returns:
    reference to the created purse
    Throws: PaymentServiceException
    for misc errors
    Throws: AdapterNotFound
    if one attempts to create a purse from a non-existent payment module
    See Also:
    deletePurse
     o deletePurse
      public static void deletePurse(String purse_name) throws PaymentServiceException
    
    The reverse of createPurse: remove it from the payment manager's list.
    Parameters:
    purse_name - distinguished name of purse to remove
    Throws: PaymentServiceException
    on failure
    See Also:
    createPurse
     o registerTransaction
      public static long registerTransaction(PaymentTransaction tr,
                                             String ext_ref) throws PaymentServiceException
    
    Register an active transaction.
    Parameters:
    tr - reference to the PaymentTransaction object
    ext_ref - external reference string corresponding to the object
    Returns:
    assigned transaction ID
    Throws: PaymentServiceException
    on misc. errors
     o deregisterTransaction
      public static void deregisterTransaction(long transaction_ID)
    
    Deregister an active transaction on completion.
    Parameters:
    transaction_ID - the transaction ID
    Returns:
    nothing
     o selectCandidatePurses
      public static Vector selectCandidatePurses(PaymentEntity peer,
                                                 String my_alias,
                                                 Amount amount,
                                                 int operation_type,
                                                 Vector PS_list,
                                                 Vector purse_name_list,
                                                 Vector options) throws PaymentServiceException
    
    Select a purse locally given certain conditions. There is no negotiation with peer or user involved in this method. User interaction _may_ be involved. For now, all parameters are ignored and the list of all available purses is returned always. But this will change!
    Parameters:
    peer - the entity with whom we plan to engage in a transaction using one of the selected purses
    my_alias - the name by which I am known to the peer; only those purses that have this string as the "username" will be chosen (some purses can have wildcard usernames?)
    amount - the amount we tentatively plan to transfer
    operation_type - flag indicating whether the proposed will bring money in or take it out. The values must be one of:
  • OP_TYPE_INCOMING
  • OP_TYPE_OUTGOING
    PS_list - list of acceptable payment systems (Vector of Strings)
    purse_name_list - list of names of acceptable purses (Vector of Strings)
    options - list of security attributes required for the proposed transaction (Vector of SecurityOption objects)
    Returns:
    the list of selected purses (Vector of PurseReference objects)
    Throws: PaymentServiceException
    for miscellaneous errors
    See Also:
    PurseReference, SecurityOption, PaymentEntity
  •  o selectPurse
      public static PurseReference selectPurse(PaymentEntity peer,
                                               int operation_type,
                                               Vector candidate_purserefs)
    
    Select a single from the input list. This selection will be eventually based on:
  • preferences,
  • interaction with the user,
  • etc. There is no negotiation with the peer involved in this method. For now, it is simple and stupid: select the first element of the list.
    Parameters:
    peer - the entity with whom we plan to engage in a transaction using one of the selected purses
    operation_type - flag indicating whether the proposed will bring money in or take it out. The values must be one of:
  • OP_TYPE_INCOMING
  • OP_TYPE_OUTGOING
    candidate_purserefs - list of candidate purses (Vector of PurseReference objects)
    Returns:
    the PurseReference object corresponding to the selected purse.
  •  o selectPurse
      public static PurseReference selectPurse(PaymentEntity peer,
                                               int operation_type,
                                               Amount amount,
                                               Vector candidate_purses,
                                               Vector PIM_shortlist) throws PaymentServiceException
    
    Select a single from the input list restricted by the results of negotiations which is also given as input. There is no direct negotiation with the peer involved in this method. This selection will be eventually based on:
  • preferences,
  • interaction with the user,
  • etc. For now, it is simple and stupid: select the first element of the list.
    Parameters:
    peer - the entity with whom we plan to engage in a transaction using one of the selected purses
    operation_type - flag indicating whether the proposed will bring money in or take it out. The values must be one of:
  • OP_TYPE_INCOMING
  • OP_TYPE_OUTGOING
    amount - the amount to be transferred in the proposed transaction. If the selected item from the PIM_shortlist has an different amount, then the value of this parameter will be reset accordingly. The caller should therefore examine the value of this parameter on return.
    PIM_shortlist - Vector of PaymentInformationMessage representing the negotiated shortlist
    candidate_purses - a Vector of PurseReference objects representing the candidate purses
    Returns:
    the PurseReference object corresponding to the selected purse.
    Throws: PaymentServiceException
    for misc. errors
    See Also:
    PaymentInformationMessage
  •  o requestChoiceOfPS
      public static Vector requestChoiceOfPS(ComPoint c,
                                             int choice_type,
                                             Vector PS_list,
                                             Amount amount) throws ComPointException, PaymentServiceException
    
    Propose a list of payment systems and an amount to the peer and request them to choose a subset of the payment systems. The choice_type flag indicates how the peer should carry out his choice. In particular, if the peer is also allowed to set a different amount than the one proposed, the value of the amount parameter will be updated on return.
    Parameters:
    c - an already open communication channel
    choice_type - flag indicating restrictions on how the peer can choose. This flag can take one of the following values:
  • FREE_CHOICE
  • SELECT_PS_AND_SET_AMOUNT
  • SELECT_PS_ONLY
    PS_list - list of proposed payment systems
    amount - proposed amount
    Returns:
    a Vector of PaymentInformationMessage objects representing the payment systems and corresponding amounts chosen by the peer
    Throws: ComPointException
    on communication errors
    Throws: PaymentServiceException
    on miscellaneous errors
    See Also:
    requestChoiceOfPS, PaymentInformationMessage
  •  o requestChoiceOfPS
      public static Vector requestChoiceOfPS(ComPoint c,
                                             int choice_type,
                                             Vector PIM_list) throws ComPointException, PaymentServiceException
    
    Propose a list of payment systems and corresponding amounts to the peer and request them to choose a subset of the payment systems. The choice_type flag indicates how the peer should carry out his choice. In particular, if the peer is also allowed to set a different amount than the one proposed, the value of the amount parameter will be updated on return.
    Parameters:
    c - an already open communication channel
    choice_type - flag indicating restrictions on how the peer can choose. This flag can take one of the following values:
  • FREE_CHOICE
  • SELECT_PS_AND_SET_AMOUNT
  • SELECT_PS_ONLY
    PIM_list - proposal list in the form of a Vector of PaymentInformationMessage objects
    Returns:
    a Vector of PaymentInformationMessage objects representing the payment systems and corresponding amounts chosen by the peer
    Throws: ComPointException
    on communication errors
    Throws: PaymentServiceException
    on miscellaneous errors
    See Also:
    choosePS, MessageListHead, PaymentInformationMessage
  •  o choosePS
      public static Vector choosePS(ComPoint c,
                                    int choice_type,
                                    Vector PS_list,
                                    Amount amount) throws PaymentServiceException, ComPointException
    
    Receive a proposed list of payment systems and corresponding amounts from the peer along with a choice_type flag. Choose a subset of the payment systems based on the input list of payment systems and the peer's proposals.
    Parameters:
    c - an already open communication channel
    choice_type - flag indicating restrictions that the peer can impose on us for the choice. It can be one of:
  • FREE_CHOICE
  • SELECT_PS_AND_SET_AMOUNT
  • SELECT_PS_ONLY
    if it is anything other than FREE_CHOICE, the peer's choice_type should agree with our choice_type
    PS_list - list of payment systems we are willing to use in the proposed transaction.
    amount - proposed amount
    Returns:
    a Vector of PaymentInformationMessage objects representing the payment systems and corresponding amounts chosen by the peer
    Throws: ComPointException
    on communication errors
    Throws: PaymentServiceException
    on miscellaneous errors
    See Also:
    choosePS, MessageListHead, PaymentInformationMessage
  •  o choosePS
      public static Vector choosePS(ComPoint c,
                                    int choice_type,
                                    Vector PIM_list) throws PaymentServiceException, ComPointException
    
    Receive a proposed list of payment systems and corresponding amounts from the peer along with a choice_type flag. Choose a subset of the payment systems based on the input list of payment systems and the peer's proposals.
    Parameters:
    c - an already open communication channel
    choice_type - flag indicating restrictions that the peer can impose on us for the choice. It can be one of:
  • FREE_CHOICE
  • SELECT_PS_AND_SET_AMOUNT
  • SELECT_PS_ONLY
    if it is anything other than FREE_CHOICE, the peer's choice_type should agree with our choice_type
    PIM_list - our proposals list in the form of a Vector of PaymentInformationMessage objects
    Returns:
    a Vector of PaymentInformationMessage objects representing the payment systems and corresponding amounts chosen by the peer
    Throws: ComPointException
    on communication errors
    Throws: PaymentServiceException
    on miscellaneous errors
    See Also:
    requestChoiceOfPS, PaymentInformationMessage
  •  o requestPurseConfirmation
      public static boolean requestPurseConfirmation(ComPoint c,
                                                     PurseReference my_purse,
                                                     Amount amount,
                                                     PaymentEntity peer) throws ComPointException, PaymentServiceException
    
    Having selected a purse, request confirmation from the peer. Exchange all parameters required for subsequent payment: e.g. the address to which payment protocol messages should be sent. This is a cover method that builds a Vector containing a single PaymentInformationMessage object and passes it to the second type of requestPurseConfirmation() method.
    Parameters:
    c - an already open channel
    my_purse - reference to the selected purse
    amount - proposed amount of the transaction
    peer - address of the peer entity to which subsequent payment system protocol messages should be sent. This negotiation is currently not supported.
    Returns:
    true/false indicating whether the confirmation succeeded
    Throws: ComPointException
    for communication errors
    Throws: PaymentServiceException
    if purse cannotbe retrieved
    See Also:
    PurseReference, PaymentInformationMessage, requestPurseConfirmation, confirmPurse
     o requestPurseConfirmation
      public static boolean requestPurseConfirmation(ComPoint c,
                                                     PurseReference my_purseref,
                                                     Vector short_list,
                                                     PaymentEntity peer) throws ComPointException, PaymentServiceException
    
    Having selected a purse, request confirmation from the peer. Exchange all parameters required for subsequent payment: e.g. the address to which payment protocol messages should be sent.
    Parameters:
    c - an already open channel
    my_purse - reference to the selected purse
    short_list - the short list (a Vector of PaymentInformationMessage objects) used earlier during the purse selection process. The amount will be taken from the first element in this short_list that corresponds to the chosen purse
    peer - address of the peer entity to which subsequent payment system protocol messages should be sent. This negotiation is currently not supported.
    Returns:
    true/false indicating whether the confirmation succeeded
    Throws: ComPointException
    for communication errors
    Throws: PaymentServiceException
    for misc errors
    See Also:
    PaymentInformationMessage, confirmPurse
     o confirmPurse
      public static PurseReference confirmPurse(ComPoint c,
                                                int op_type,
                                                Amount amount,
                                                Vector candidate_purses,
                                                PaymentEntity peer) throws ComPointException, PaymentServiceException
    
    Receive a confirmation request from the peer containing a single payment system and a corresponding amount. Decide if it is an acceptable choice based on our own input parameters. Choose a single purse from the list available to us. Set any other parameters necessary for subsequent protocol flows inside the chosen payment system. This is just a cover method that builds a Vector containing PaymentInformationMessage objects (one per available purse), invokes the second confirmPurse() method passing this Vector as a parameter, checks to make sure that the amount proposed by the peer agrees with our amount and returns the selected purse. TODO: This is ugly. Come back and check this later. Should we need switches to decide whether the responder is allowed to change the amount or not?
    Parameters:
    c - an already open channel
    op_type - operation_type indicating the direction of the proposed flow of money. It can take one of the following values:
  • OP_TYPE_INCOMING
  • OP_TYPE_OUTGOING
    amount - proposed amount for the transaction (must match what the peer proposes)
    candidate_purses - list of candidate purses
    peer - location to return the address to which subsequent payment system protocol messages should be sent.
    Throws: ComPointException
    for communication errors
    Throws: PaymentServiceException
    for misc errors
    See Also:
    requestPurseConfirmation, confirmPurse, PaymentInformationMessage
  •  o confirmPurse
      public static PurseReference confirmPurse(ComPoint c,
                                                int op_type,
                                                Amount amount,
                                                Vector PIM_list,
                                                Vector candidate_purses,
                                                PaymentEntity peer) throws ComPointException, PaymentServiceException
    
    Receive a confirmation request from the peer containing a single payment system and a corresponding amount. Decide if it is an acceptable choice based on our own input parameters. Choose a single purse from the list available to us. Set any other parameters necessary for subsequent protocol flows inside the chosen payment system.
    Parameters:
    c - an already open channel
    op_type - operation_type indicating the direction of the proposed flow of money. It can take one of the following values:
  • OP_TYPE_INCOMING
  • OP_TYPE_OUTGOING
    amount - location to return the value of the agreed upon amount
    PIM_list - list of acceptable combinations in the form of a Vector of PaymentInformationMessage objects.
    candidate_purses - list of candidate purses
    peer - location to return the address to which subsequent payment system protocol messages should be sent.
    Throws: ComPointException
    for communication errors
    Throws: PaymentServiceException
    for misc errors
    See Also:
    requestPurseConfirmation, PaymentInformationMessage
  •  o selectPayingPurse
      public static PurseReference selectPayingPurse(PaymentEntity peer,
                                                     String my_alias,
                                                     Amount amount,
                                                     Vector PS_list,
                                                     Vector purse_name_list,
                                                     Vector options,
                                                     String ext_ref) throws PaymentServiceException, ComPointException
    
    A specific way of selecting a purse for payment. There are many ways in which the various purse selection methods (both local and negotiated) can be combined. This method implments one such combination with certain policy assumptions for selecting a purse for payment. These assumptions are:
  • the payee is allowed to choose a subset of the payment systems that we propose _and_ to reset the amount we propose to pay.
    Parameters:
    peer - entity to which we propose to make a payment
    my_alias - the alias by which I am known to the peer
    amount - the amount we propose to pay
    PS_list - the payment systems we are prepared to use (this parameter is not used yet). This parameter is a Vector of Strings.
    purse_name_list - the list of purses that we are prepared to use (this parameter is not used yet). This parameter os a Vector of Strings.
    options - list of security options required. This parameter is a Vector SecurityOption objects.
    ext_ref - external reference string
    Returns:
    reference to the selected purse.
    Throws: ComPointException
    on communication errors.
    Throws: PaymentServiceException
    on misc. errors.
    See Also:
    selectReceivingPurse, SecurityOption
  •  o selectReceivingPurse
      public static PurseReference selectReceivingPurse(PaymentEntity peer,
                                                        PaymentEntity me,
                                                        Amount amount,
                                                        Vector PS_list,
                                                        Vector purse_name_list,
                                                        Vector options,
                                                        String ext_ref) throws PaymentServiceException, ComPointException
    
    A specific way of selecting a purse for receiving payment. There are many ways in which the various purse selection methods (both local and negotiated) can be combined. This method implments one such combination with certain policy assumptions for selecting a purse for receiving payment. These assumptions are:
  • the payee is allowed to choose a subset of the payment systems that we propose _and_ to reset the amount we propose to pay.
    Parameters:
    peer - entity from whom we propose to receive a payment
    me - PaymentEntity object indicating where we should listen to in order to open a negotiation channel
    amount - the amount we propose to receive
    PS_list - the payment systems we are prepared to use (this parameter is not used yet). This parameter is a Vector of Strings.
    purse_name_list - the list of purses that we are prepared to use (this parameter is not used yet). This parameter os a Vector of Strings.
    options - list of security options required. This parameter is a Vector SecurityOption objects.
    ext_ref - external reference string sent by the peer
    Returns:
    reference to the selected purse.
    Throws: ComPointException
    on communication errors.
    Throws: PaymentServiceException
    on misc. errors.
    See Also:
    selectPayingPurse, SecurityOption

  • All Packages  Class Hierarchy  This Package  Previous  Next  Index