com.ibm.commerce.payment.utils
Class PMClientFactory

java.lang.Object
  |
  +--com.ibm.commerce.payment.utils.PMClientFactory
All Implemented Interfaces:
PMConstants

public class PMClientFactory
extends java.lang.Object
implements PMConstants

Factory class for vending PaymentServerClient or PaymentServerSSLClient object that WebSphere Commerce server uses to communicate with WebSphere Commerce Payments.

The configuration data in the WebShpere Commerce Configuration XML dictates whether a PaymentServerClient object or PaymentServerSSLClient object is returned by this Factory class.


Field Summary
static java.lang.String CLASSNAME
           
 
Fields inherited from interface com.ibm.commerce.payment.utils. PMConstants
CFG_PMWEBSERVERPORT, CFG_SOCKSPORT, COPYRIGHT, DEFAULT_WCS_PMADMINID, DEFAULT_WEBSERVER_PORT, DEFAULT_WEBSERVER_SSL_PORT, INST_CFG_CONFILEPATH, PM_CFG_DTDPATH, PM_CFG_HOSTNAME, PM_CFG_PMADMINID, PM_CFG_PMWEBSERVERPORT, PM_CFG_PROFILEPATH, PM_CFG_SOCKSHOSTNAME, PM_CFG_SOCKSPORT, PM_CFG_USEEXTERNALPM, PM_CFG_USENONSSLPMCLNT, PM_CFG_USESOCKS
 
Constructor Summary
PMClientFactory()
          PMClientFactory default constructor.
 
Method Summary
static PaymentServerClient createPMClient()
          Factory method for vending PaymentServerClient or PaymentServerSSLClient object that WebSphere Commerce uses to communicate with WebSphere Commerce Payments.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final java.lang.String CLASSNAME
Constructor Detail

PMClientFactory

public PMClientFactory()
PMClientFactory default constructor.

This constructor is not expected to be called as this class contains only static methods.

Method Detail

createPMClient

public static PaymentServerClient createPMClient()
                                          throws ECException
Factory method for vending PaymentServerClient or PaymentServerSSLClient object that WebSphere Commerce uses to communicate with WebSphere Commerce Payments.
Returns:
com.ibm.etill.framework.clientapi.PaymentServerClient

Note: The returned object may actually be an instance of the PaymentServerSSLClient class which extends from the PaymentServerClient class.

For SSL Client, it is extremely important to issue close before exiting. Make sure you code a finally block with the close if the PaymentServerClient object is non null.

Throws:
ECException - If no client object can be created.