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 the WebSphere Payment Manager.

By default, the createPMClient creates a PaymentServerSSLClient that can be used to communicate with the Payment Manager installed on the local machine.


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 com.ibm.commerce.payment.utils.PaymentServerClient createPMClient()
          Factory method for vending PaymentServerClient or PaymentServerSSLClient object that WebSphere Commerce uses to communicate with the Payment Manager.
 
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 com.ibm.commerce.payment.utils.PaymentServerClient createPMClient()
                                                                         throws ECException
Factory method for vending PaymentServerClient or PaymentServerSSLClient object that WebSphere Commerce uses to communicate with the Payment Manager.

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.