IBM Branch Transformation Toolkit Javadoc

com.ibm.btt.services
Class BTTServiceRequesterFactory

java.lang.Object
  extended bycom.ibm.btt.services.BTTServiceRequesterFactory

public class BTTServiceRequesterFactory
extends java.lang.Object

The BTTServiceRequestFactory create a new requester with a resource bundle name or from the XML definition file of BTT.


Field Summary
static java.lang.String COMPID
           
 Messages msg
          A storage to keep the requester objects in JVM.
static java.util.Hashtable serviceRequesterHashtable
          A storage to keep the requester objects in JVM.
 
Constructor Summary
BTTServiceRequesterFactory()
           
 
Method Summary
static BTTServiceRequester createServiceRequester(java.lang.String resourceBundleName, java.lang.String serviceID)
          The method create an instance of a service requester based on a given resource bundle name
protected static java.util.Hashtable getRequesterCache()
           
static BTTServiceRequester getServiceRequester(java.lang.String serviceRequesterID)
          The method will find the existing instance from the cache by the given service id first.
static BTTServiceRequester getServiceRequester(java.lang.String resourceBundleName, java.lang.String serviceID)
          The method will find the existing instance from the cache by the given service id first.
static BTTServiceRequester getServiceRequester(java.lang.String resourceBundleName, java.lang.String serviceID, java.lang.String serviceType)
          The method will find the existing instance from the cache by the given service id first.
static BTTServiceRequester getServiceRequesterByXML(java.lang.String serviceRequesterID)
          Method getServiceRequesterByXML creates an instance of a service requester based on a given requester ID.
static void releaseServiceRequester(java.lang.String serviceID)
          Method getServiceRequesterByXML creates an instance of a service requester based on a given requester ID.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPID

public static final java.lang.String COMPID
See Also:
Constant Field Values

serviceRequesterHashtable

public static java.util.Hashtable serviceRequesterHashtable
A storage to keep the requester objects in JVM.


msg

public Messages msg
A storage to keep the requester objects in JVM.

Constructor Detail

BTTServiceRequesterFactory

public BTTServiceRequesterFactory()
Method Detail

getServiceRequesterByXML

public static BTTServiceRequester getServiceRequesterByXML(java.lang.String serviceRequesterID)
                                                    throws BTTCreateServiceRequesterException
Method getServiceRequesterByXML creates an instance of a service requester based on a given requester ID. The id is defined in the dsesrvce.xml file.

Parameters:
serviceRequesterID - A service requester id which defined in the dsesrvce.xml.
Returns:
BTTServiceRequester The object instance of the service requester
Throws:
BTTCreateServiceRequesterException

getServiceRequester

public static BTTServiceRequester getServiceRequester(java.lang.String serviceRequesterID)
                                               throws BTTCreateServiceRequesterException,
                                                      DSEException
The method will find the existing instance from the cache by the given service id first. If it is not found in the cache, it will find the resource bundle name of the service requester based on the given id from ServiceRequesterIDs.properties and create a new service requester instance by the definition of the resource bundle of the service requester.

Parameters:
serviceRequesterID - A service requester id which defined in the property file.
Returns:
BTTServiceRequester The object instance of the service requester
Throws:
BTTCreateServiceRequesterException
DSEException

getServiceRequester

public static BTTServiceRequester getServiceRequester(java.lang.String resourceBundleName,
                                                      java.lang.String serviceID)
                                               throws BTTCreateServiceRequesterException,
                                                      DSEException
The method will find the existing instance from the cache by the given service id first. If it is not found, it will create an instance of a service requester based on the given service id and the resource bundle. If the resource bundle is null or zero length, it will find the resource bundle name of the service requester based on the given service id from ServiceRequesterIDs.properties

Parameters:
resourceBundleName - the resource bundle name given by the application.
serviceID - Service ID
Returns:
BTTServiceRequester The object instance of the service requester
Throws:
BTTCreateServiceRequesterException
DSEException

getServiceRequester

public static BTTServiceRequester getServiceRequester(java.lang.String resourceBundleName,
                                                      java.lang.String serviceID,
                                                      java.lang.String serviceType)
                                               throws BTTCreateServiceRequesterException,
                                                      DSEException
The method will find the existing instance from the cache by the given service id first. If it is not found, it will create an instance of a service requester based on the given service type and the resource bundle. If the resource bundle is null or zero length, it will find the resource bundle name of the service requester based on the given service type from ServiceRequesterIDs.properties

Parameters:
resourceBundleName - the resource bundle name given by the application.
serviceID - Service ID
serviceType - Service type
Returns:
BTTServiceRequester The object instance of the service requester
Throws:
BTTCreateServiceRequesterException
DSEException

createServiceRequester

public static BTTServiceRequester createServiceRequester(java.lang.String resourceBundleName,
                                                         java.lang.String serviceID)
                                                  throws BTTCreateServiceRequesterException,
                                                         DSEException
The method create an instance of a service requester based on a given resource bundle name

Parameters:
resourceBundleName - Name of the properties file or the resource bundle class name.
Returns:
BTTServiceRequester An Instance of the service requester.
Throws:
BTTCreateServiceRequesterException
DSEException

releaseServiceRequester

public static void releaseServiceRequester(java.lang.String serviceID)
                                    throws java.lang.Exception
Method getServiceRequesterByXML creates an instance of a service requester based on a given requester ID. The id is defined in the dsesrvce.xml file.

Parameters:
serviceID - A service requester id which defined in the dsesrvce.xml.
Returns:
BTTServiceRequester The object instance of the service requester
Throws:
BTTCreateServiceRequesterException
java.lang.Exception

getRequesterCache

protected static java.util.Hashtable getRequesterCache()
Returns:
Hashtable The cache of the requester instance

IBM Branch Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2005