|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.ProcessorEventManager
public class ProcessorEventManager
This class manages the flow of events between the notifiers (producers of the events) and the handlers (consumers of the events), both when the event is produced locally or remotelly in a server machine. To make this possible, the server and the client should have only one instance of the EventManager existing at any given moment. To make the EventManager more easily addressable, most of its interface is based on static methods.
Field Summary | |
---|---|
static java.lang.String |
COMPID
Keeps the component identification that will be used by the traces tool. |
protected Vector |
exceptionHandlerList
|
protected Hashtable |
handlersList
|
protected static Vector |
notifierList
|
protected static ProcessorEventManager |
uniqueInstance
|
protected static Hashtable |
workstationList
|
Constructor Summary | |
---|---|
ProcessorEventManager()
|
Method Summary | |
---|---|
static void |
addHandler(ProcessorHandler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext)
Registers the event Handler to the Notifier, whether the notifier exists on this machine or not. |
static void |
addHandler(ProcessorHandler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext,
java.lang.String aServerTID)
Registers the event Handler to the Notifier if the notifier exists on the specified server. |
static void |
addHandlerForException(ProcessorHandler aHandler)
Registers the specified Handler for exceptions. |
static void |
addHandlerForException(ProcessorHandler aHandler,
java.lang.String aServerTID)
Registers the specified Handler for exceptions originating from the server identified by aServerTID. |
static void |
addNotifier(ProcessorNotifier aNotifier)
Adds a Notifier to the list of Notifiers. |
protected static void |
addWorkstation(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aWorkstationTID)
Adds the specified workstation to the workstationList. |
protected static ProcessorNotifier |
getNotifier(java.lang.String aNotifierName)
Returns the Notifier named aNotifierName. |
protected static Vector |
getNotifierList()
Returns the notifierList attribute value. |
protected static ProcessorEventManager |
getUniqueInstance()
Returns the unique instance of EventManager running on the application environment. |
protected static Hashtable |
getWorkstationList()
Returns the workstationList attribute value. |
protected static boolean |
hasHandlersInterestedIn(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aTID)
Returns true if the EventManager has a Handler registered for the specified remote event. |
static void |
removeHandler(ProcessorHandler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext)
Deregisters the event Handler from the notifier, whether the Notifier exists on this machine or not. |
static void |
removeHandler(ProcessorHandler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName,
Context aContext,
java.lang.String aTID)
Deregisters the event Handler from the notifier if the Notifier exists on the specified server. |
static void |
removeHandlerForException(ProcessorHandler aHandler)
Deregisters the specified Handler for exceptions. |
static void |
removesHandlerForException(ProcessorHandler aHandler,
java.lang.String aServerTID)
Deregisters the specified Handler for exceptions originating from the server identified by aServerTID. |
static void |
reset()
Initializes this class. |
protected static void |
setUniqueInstance(ProcessorEventManager anEventManager)
Sets the uniqueInstance attribute value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COMPID
protected Hashtable handlersList
protected Vector exceptionHandlerList
protected static Vector notifierList
protected static ProcessorEventManager uniqueInstance
protected static Hashtable workstationList
Constructor Detail |
---|
public ProcessorEventManager()
Method Detail |
---|
public static void addHandler(ProcessorHandler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.base.ProcessorHandler - The Handler that wants to register for an eventanEventName
- java.lang.String - The name of the event the Handler is interested inaNotifierName
- java.lang.String - The name of the Notifier that will signal the event identified as anEventNameaContext
- com.ibm.btt.base.Context - The context where the EventManager will look for the notifier aNotifierName
DSEInvalidArgumentException
public static void addHandler(ProcessorHandler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aServerTID) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.base.ProcessorHandler - The Handler that wants to register for an eventanEventName
- java.lang.String - The name of the event the Handler is interested inaNotifierName
- java.lang.String - The name of the Notifier that will signal the event identified as anEventNameaContext
- com.ibm.btt.base.ContextaServerTID
- java.lang.String - The TID of the server where the event will be produced
DSEInvalidArgumentException
public static void addHandlerForException(ProcessorHandler aHandler) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.base.ProcessorHandler
DSEInvalidArgumentException
public static void addHandlerForException(ProcessorHandler aHandler, java.lang.String aServerTID) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.base.ProcessorHandleraServerTID
- java.lang.String - The TID of the server where the exception will be originated
DSEInvalidArgumentException
public static void addNotifier(ProcessorNotifier aNotifier) throws DSEInvalidArgumentException
aNotifier
- com.ibm.btt.base.ProcessorNotifier
DSEInvalidArgumentException
protected static void addWorkstation(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aWorkstationTID)
anEventName
- java.lang.StringaNotifierName
- java.lang.StringaWorkstationTID
- java.lang.Stringprotected static ProcessorNotifier getNotifier(java.lang.String aNotifierName)
aNotifierName
- java.lang.String
protected static Vector getNotifierList()
protected static ProcessorEventManager getUniqueInstance()
protected static Hashtable getWorkstationList()
protected static boolean hasHandlersInterestedIn(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aTID)
anEventName
- java.lang.StringaNotifierName
- java.lang.StringaTID
- java.lang.String
public static void removeHandler(ProcessorHandler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException, BTTProcessorHandlerNotFoundException
aHandler
- com.ibm.btt.base.ProcessorHandler - The Handler that wants to deregister for an eventanEventName
- java.lang.String - The name of the event the Handler is no longer interested inaNotifierName
- java.lang.String - The name of the Notifier that will signal the event identified as "anEventName"aContext
- com.ibm.btt.base.Context - The context where the EventManager will look for the notifier "aNotifierName"
DSEInvalidArgumentException
BTTProcessorHandlerNotFoundException
public static void removeHandler(ProcessorHandler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws BTTProcessorHandlerNotFoundException, DSEInvalidArgumentException
aHandler
- com.ibm.btt.base.ProcessorHandler - The Handler that wants to deregister for an eventanEventName
- java.lang.String - The name of the event the Handler is no more interested inaNotifierName
- java.lang.String - The name of the Notifier that will signal the event identified as anEventNameaContext
- com.ibm.btt.base.ContextaTID
- java.lang.String - The TID of the server
BTTProcessorHandlerNotFoundException
DSEInvalidArgumentException
public static void removeHandlerForException(ProcessorHandler aHandler) throws DSEInvalidArgumentException, BTTProcessorHandlerNotFoundException
aHandler
- com.ibm.btt.base.ProcessorHandler
DSEInvalidArgumentException
BTTProcessorHandlerNotFoundException
public static void removesHandlerForException(ProcessorHandler aHandler, java.lang.String aServerTID) throws DSEInvalidArgumentException, BTTProcessorHandlerNotFoundException
aHandler
- com.ibm.btt.base.ProcessorHandleraServerTID
- java.lang.String - The TID of the server where the exception will be originated
DSEInvalidArgumentException
BTTProcessorHandlerNotFoundException
public static void reset()
protected static void setUniqueInstance(ProcessorEventManager anEventManager)
anEventManager
- com.ibm.btt.base.ProcessorEventManager
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |