com.ibm.soa.parlayx21.payment
Class ReserveAmountChargingProxy

java.lang.Object
  extended by com.ibm.soa.parlayx21.payment.ReserveAmountChargingProxy
All Implemented Interfaces:
ReserveAmountCharging, java.rmi.Remote

public class ReserveAmountChargingProxy
extends java.lang.Object
implements ReserveAmountCharging


Constructor Summary
ReserveAmountChargingProxy()
           
 
Method Summary
 void chargeReservation(java.lang.String reservationIdentifier, ChargingInformation charge, java.lang.String referenceCode)
          This operation results in charging to a reservation indicated by the reservation id.
 java.lang.String getEndpoint()
           
 ReserveAmountCharging getReserveAmountCharging()
           
 void releaseReservation(java.lang.String reservationIdentifier)
          This operation returns the funds left in a reservation indicated by reservation id to the account from which this reservation was made.
 void reserveAdditionalAmount(java.lang.String reservationIdentifier, ChargingInformation charge)
          This operation results in the addition/subtraction of a charge to/from an existing reservation indicated by the reservation id.
 java.lang.String reserveAmount(java.net.URI endUserIdentifier, ChargingInformation charge)
          This operation reserves a charge for an account indicated by the end user identifier.
 void setEndpoint(java.lang.String endpoint)
           
 void useJNDI(boolean useJNDI)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReserveAmountChargingProxy

public ReserveAmountChargingProxy()
Method Detail

useJNDI

public void useJNDI(boolean useJNDI)

getEndpoint

public java.lang.String getEndpoint()

setEndpoint

public void setEndpoint(java.lang.String endpoint)

getReserveAmountCharging

public ReserveAmountCharging getReserveAmountCharging()

reserveAmount

public java.lang.String reserveAmount(java.net.URI endUserIdentifier,
                                      ChargingInformation charge)
                               throws java.rmi.RemoteException,
                                      PolicyException,
                                      ServiceException
Description copied from interface: ReserveAmountCharging

This operation reserves a charge for an account indicated by the end user identifier. The charge to be reserved is specified as a ChargingInformation data structure. Note that reservations do not last forever; it is assumed the default reservation enforcement time is negotiated off-line. If the reservation times out, the remaining funds will be returned to the account from which this reservation was made. However, the remaining funds shall preferably be returned explicitly to the account using the releaseReservation operation. The description element of the ChargingInformation data structure is used for textual information to appear on the bill. Subsequent textual information provided during this charging session will be appended to this textual information; one charging session to a reservation will result in only one entry on the bill. In case of success, a reservation id is returned for future reference; for example, subsequent charging against the existing reservation using the chargeReservation operation.

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.
  * SVC0007 - Invalid charging information

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
reserveAmount in interface ReserveAmountCharging
Parameters:
endUserIdentifier - xsd:anyURI The end user's account subject to the reservation
charge - common: ChargingInformation

Information on the charge to be reserved. In the ChargingInformation structure:
  * the description element is information to appear on the bill.
  * the charge to be reserved appears either directly in the amount element or encoded in the code element. If both these elements are missing or empty, a service exception (SVC0007) will be thrown.
  * the optional currency element specifies the currency to be used for the charge reservation.

Returns:
reservationIdentifierresult xsd:string It is an identifier for the newly created reservation
Throws:
java.rmi.RemoteException
PolicyException
ServiceException

reserveAdditionalAmount

public void reserveAdditionalAmount(java.lang.String reservationIdentifier,
                                    ChargingInformation charge)
                             throws java.rmi.RemoteException,
                                    PolicyException,
                                    ServiceException
Description copied from interface: ReserveAmountCharging

This operation results in the addition/subtraction of a charge to/from an existing reservation indicated by the reservation id. The charge is specified as a ChargingInformation data structure. Note that reservations do not last forever; it is assumed the default reservation enforcement time is negotiated off-line. Invoking this message will extend the reservation enforcement time for another off-line-negotiated period. The description element of the ChargingInformation data structure is used for appending textual information to appear on the bill. The textual information is appended to the initial textual information given by the reserveAmount operation; one charging session to a reservation will result in only one entry on the bill. Reserved credit can be returned to the account through the releaseReservation operation.

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.
  * SVC0007 - Invalid charging information

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
reserveAdditionalAmount in interface ReserveAmountCharging
Parameters:
reservationIdentifier - xsd:string An identifier for the reservation to be amended
charge - common:ChargingInformation

Information on the charge to be added to (or subtracted from) the reservation. In the ChargingInformation structure:
  * the description element is information to appear on the bill.
  * the charge to be reserved appears either directly in the amount element or encoded in the code element. If both these elements are missing or empty, a service exception (SVC0007) will be thrown.
  * the optional currency element is not applicable: the currency is defined only when the reservation is established (for example, the reserveAmount operation is invoked)specifies the currency to be used for the charge reservation.

Throws:
java.rmi.RemoteException
PolicyException
ServiceException

chargeReservation

public void chargeReservation(java.lang.String reservationIdentifier,
                              ChargingInformation charge,
                              java.lang.String referenceCode)
                       throws java.rmi.RemoteException,
                              PolicyException,
                              ServiceException
Description copied from interface: ReserveAmountCharging

This operation results in charging to a reservation indicated by the reservation id. Reservations, identified by reservation id, are established through invoking the reserveAmount operation. The charge is specified as a ChargingInformation data structure. The description element of the ChargingInformation data structure is used for appending textual information to appear on the bill. The textual information is appended to the initial textual information given by the reserveAmount operation; one charging session to a reservation will result in only one entry on the bill. The reference code is used to uniquely identify the request; it is the application's responsibility to provide a unique reference code within the scope of the application.

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.
  * SVC0007 - Invalid charging information
  * SVC0270 - Charge failed.

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
chargeReservation in interface ReserveAmountCharging
Parameters:
reservationIdentifier - xsd:string An identifier for the reservation to be charged
charge - common:ChargingInformation

Information on the charge to the reservation. In the ChargingInformation structure:
  * the description element is information to appear on the bill.
  * the charge to the reservation appears either directly in the amount element or encoded in the code element. If both these elements are missing or empty, a service exception (SVC0007) will be thrown.
  * the optional currency element is not applicable: the currency is defined only when the reservation is established (for example, the reserveAmount operation is invoked)specifies the currency to be used for the charge to the reservation.

referenceCode - xsd:string Textual information to uniquely identify the request, for example, in case of disputes
Throws:
java.rmi.RemoteException
PolicyException
ServiceException

releaseReservation

public void releaseReservation(java.lang.String reservationIdentifier)
                        throws java.rmi.RemoteException,
                               PolicyException,
                               ServiceException
Description copied from interface: ReserveAmountCharging

This operation returns the funds left in a reservation indicated by reservation id to the account from which this reservation was made. Reservations identified by reservation id, are established by invoking the reserveAmount operation.

Referenced faults

ServiceException from ES 202 391-1 [2]:
  * SVC0001 - Service error.
  * SVC0002 - Invalid input value.

PolicyException from ES 202 391-1 [2]:
  * POL0001 - Policy error.

Specified by:
releaseReservation in interface ReserveAmountCharging
Parameters:
reservationIdentifier - xsd:string An identifier for the reservation to be released
Throws:
java.rmi.RemoteException
PolicyException
ServiceException


Copyright © 2003 IBM Corp. All Rights Reserved.