IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.automaton
Class ProcessorManager

java.lang.Object
  extended by com.ibm.btt.base.DSEHandler
      extended by com.ibm.btt.automaton.ProcessorManager
All Implemented Interfaces:
Handler
Direct Known Subclasses:
HtmlProcessorManager

public class ProcessorManager
extends DSEHandler

The ProcessManager keeps track of the processes, including their status. Each process is identified by a processId in the processRegistry.


Field Summary
protected  Hashtable processorRegistry
           
protected static ProcessorManager uniqueInstance
           
 
Constructor Summary
ProcessorManager()
           
 
Method Summary
 void abortProcessor(java.lang.String processorId)
          Aborts the Processor given the processorId.
 Processor createProcessor(java.lang.String processorName)
          Creates a Processor given by the processorName through the ProcessorExternalizer.
 Processor createProcessorFromCache(java.lang.String processorName)
          Creates a Processor given by the processorName through the ProcessorExternalizer.
 void executeProcessor(java.lang.String processorId)
          Executes the Processor given the processorId.
 Hashtable getProcessorRegistry()
          Returns the processor registry.
static ProcessorManager getUniqueInstance()
          Returns the unique instance of ProcessorManager running on the application environment.
 void removeProcessor(java.lang.String processorId)
          Removes the Processor from the processorRegistry given the processorId.
 void resetProcessorManager()
          This method aborts all the processors that are running and removes the reference in the processorRegistry.
 void resumeProcessor(java.lang.String processorId)
          Resumes the Processor given the processorId.
static void setUniqueInstance(ProcessorManager newUniqueInstance)
          Sets a new instance of the processorManager.
 void suspendProcessor(java.lang.String processorId)
          Suspends the Processor given the processorId.
 
Methods inherited from class com.ibm.btt.base.DSEHandler
dispatchEvent, handleEvent, handleEvent, stopHandlingEvent, stopHandlingEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

processorRegistry

protected Hashtable processorRegistry

uniqueInstance

protected static ProcessorManager uniqueInstance
Constructor Detail

ProcessorManager

public ProcessorManager()
Method Detail

abortProcessor

public void abortProcessor(java.lang.String processorId)
                    throws DSEProcessorException
Aborts the Processor given the processorId.

Parameters:
processorId - java.lang.String
Throws:
DSEProcessorException

createProcessor

public Processor createProcessor(java.lang.String processorName)
                          throws java.io.IOException,
                                 DSEInvalidArgumentException,
                                 DSEProcessorException
Creates a Processor given by the processorName through the ProcessorExternalizer. The procId is created with a call to the static method getUniqueCode() in com.ibm.btt.base.JavaExtensions. After it is instantiated, the processor is added to the ProcessorRegistry by its procId. The cache is not used to avoid reusing an old context, which could have data changed from the original.

Parameters:
processorName - java.lang.String
Returns:
com.ibm.btt.automaton.Processor
Throws:
java.io.IOException
DSEInvalidArgumentException
DSEProcessorException

createProcessorFromCache

public Processor createProcessorFromCache(java.lang.String processorName)
                                   throws java.io.IOException,
                                          DSEInvalidArgumentException,
                                          DSEProcessorException
Creates a Processor given by the processorName through the ProcessorExternalizer. The procId is created with a call to the static method getUniqueCode() in com.ibm.btt.base.JavaExtensions. After it is instantiated, the processor is added to the ProcessorRegistry by its procId. The cache is not used to avoid reusing an old context, which could have data changed from the original.

Parameters:
processorName - java.lang.String
Returns:
com.ibm.btt.automaton.Processor
Throws:
java.io.IOException
DSEInvalidArgumentException
DSEProcessorException

executeProcessor

public void executeProcessor(java.lang.String processorId)
                      throws DSEInvalidArgumentException,
                             DSEProcessorException
Executes the Processor given the processorId.

Parameters:
processorId - java.lang.String
Throws:
DSEEInvalidArgumentxception
DSEProcessorException
DSEInvalidArgumentException

getProcessorRegistry

public Hashtable getProcessorRegistry()
Returns the processor registry.

Returns:
Hashtable

getUniqueInstance

public static ProcessorManager getUniqueInstance()
Returns the unique instance of ProcessorManager running on the application environment.

Returns:
com.ibm.btt.automaton.ProcessorManager

removeProcessor

public void removeProcessor(java.lang.String processorId)
Removes the Processor from the processorRegistry given the processorId.

Parameters:
processorId - java.lang.String

resetProcessorManager

public void resetProcessorManager()
This method aborts all the processors that are running and removes the reference in the processorRegistry.


resumeProcessor

public void resumeProcessor(java.lang.String processorId)
Resumes the Processor given the processorId.

Parameters:
processorId - java.lang.String

setUniqueInstance

public static void setUniqueInstance(ProcessorManager newUniqueInstance)
Sets a new instance of the processorManager.

Parameters:
newUniqueInstance - com.ibm.btt.automaton.ProcessorManager

suspendProcessor

public void suspendProcessor(java.lang.String processorId)
Suspends the Processor given the processorId.

Parameters:
processorId - java.lang.String

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011