|
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.event.EventManager
public class EventManager
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 | |
---|---|
protected static Hashtable |
bttMirrorNotifiersList
|
static java.lang.String |
COPYRIGHT
|
protected Vector |
exceptionHandlerList
|
protected Hashtable |
handlersList
Keeps the component identification that will be used by the traces tool. |
protected static boolean |
isCSNotificationListener
|
protected static Hashtable |
mirrorNotifiers
|
protected static Vector |
notifierList
|
protected static Hashtable |
notifiers
|
protected Hashtable |
remoteHandlersList
|
protected JMSEvTransmit |
transmit
|
protected static EventManager |
uniqueInstance
|
protected static Hashtable |
workstationList
|
Constructor Summary | |
---|---|
EventManager()
|
Method Summary | |
---|---|
protected static void |
addBTTMirrorHandlerForException(java.lang.String aSessionId)
Registers a Handler for exceptions originating from a server. |
static void |
addBTTMirrorNotifier(MirrorNotifier aMirrorNotifier)
Adds a BTT Mirror Notifier to BTT Mirror Notifier list. |
protected static void |
addHandler(Handler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName)
Registers the event Handler to the Notifier, whether the notifier exists on this machine or not. |
protected static void |
addHandler(Handler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aServerName)
Registers the event Handler to the Notifier if the notifier exists on the specified server. |
protected static void |
addHandler(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aSessionId)
Registers the client to the Notifier aNotifierName as interested in the specified event for the duration of the session. |
protected static void |
addHandlerForException(Handler aHandler)
Registers the specified Handler for exceptions. |
protected static void |
addHandlerForException(Handler aHandler,
java.lang.String aServerTID)
Registers the specified Handler for exceptions originating from the server identified by aServerTID. |
protected static void |
addMirrorHandlerToBTTMirrorNotifer(MirrorNotifier aMirrorNotifier,
java.lang.String anEventname,
MirrorHandler aMirrorHandler)
|
protected static void |
addMirrorNotifier(MirrorNotifier aNotifier,
java.lang.String aServerName)
Returns the MirrorNotifier named aNotifierName. |
protected static void |
addNotifier(Notifier aNotifier)
Adds a Notifier to the list of Notifiers. |
protected static void |
addNotifier(Notifier aNotifier,
java.lang.String aTID)
Adds a Notifier to the list of Notifiers. |
protected static void |
addNotifier(Notifier aNotifier,
java.lang.String aNotifierName,
java.lang.String aNotifierType)
|
protected static void |
addWorkstation(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aWorkstationTID)
Adds the specified workstation to the workstationList. |
static MirrorNotifier |
getBTTMirrorNotifier(java.lang.String aNotifierName)
Gets BTT Mirror Notifier from BTT Mirror Notifier list. |
static Hashtable |
getBTTMirrorNotifiers()
Get BTT Mirror Notifier List |
static CSServerService |
getCSServer()
Get CSServer instance |
protected static MirrorNotifier |
getMirrorNotifier(java.lang.String aNotifierName)
Returns the MirrorNotifier named aNotifierName. |
protected static MirrorNotifier |
getMirrorNotifier(java.lang.String aNotifierName,
java.lang.String aServerName)
Returns the MirrorNotifier named aNotifierName. |
protected static Hashtable |
getMirrorNotifiers()
Returns the mirrorNotifiers attribute value. |
protected static Notifier |
getNotifier(java.lang.String aNotifierName)
|
protected static Vector |
getNotifierList()
Returns the notifierList attribute value. |
protected static Hashtable |
getNotifiers()
|
protected static EventManager |
getUniqueInstance()
Returns the unique instance of EventManager running on the application environment. |
protected static Hashtable |
getWorkstationList()
Returns the workstationList attribute value. |
void |
handleCSNotificationEvent(CSNotificationEvent event)
Calls the dispatch methods of the registered Handlers based on the information included in the event CSNotificationEvent. |
static void |
handleJMSNotificationEvent(DSEEventObject anEvent)
When Event Manager get singal event request from queue, it will invoke this method to get Mirror Notifier to singal event. |
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 |
removeBTTMirrorHandler(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aHandlerGlobalID)
Removes a BTT Mirror Handler from the BTT Mirror Handler list of a BTT Mirror Notifier. |
protected static void |
removeBTTMirrorHandlerForException(java.lang.String aSessionId)
|
static java.lang.Object |
removeBTTMirrorNotifier(java.lang.String aNotifierName)
Removes a BTT Mirror Notifier from BTT Mirror Notifier list. |
protected static void |
removeHandler(Handler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName)
Removes a handler for the specified event signaled by a notifier coming from any of the workstations the machines have sessions with. |
protected static void |
removeHandler(Handler aHandler,
java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aServerName)
Removes a handler for the specified event signaled by the specified notifier coming from the specified workstation. |
protected static void |
removeHandler(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aSessionId)
Deregisters the client to the Notifier "aNotifierName" as interested in the specified event for the duration of the session. |
protected static void |
removeHandlerForException(Handler aHandler)
Deregisters the specified Handler for exceptions. |
protected static void |
removeHandlerForException(java.lang.String aSessionId)
Deregisters the specified Handler for exceptions originating from the server. |
protected static void |
removeNotifier(java.lang.String aNotifierName)
|
protected static void |
removesHandlerForException(Handler aHandler,
java.lang.String aServerTID)
Deregisters the specified Handler for exceptions originating from the server identified by aServerTID. |
protected static void |
removeWorkstation(java.lang.String anEventName,
java.lang.String aNotifierName,
java.lang.String aClientWorkstation)
Removes the specifed workstation from the workstationList. |
static void |
reset()
Initializes this class. |
static void |
sendException(DSEException anException)
Sends an exception event to client. |
protected static void |
setUniqueInstance(EventManager anEventManager)
Sets the uniqueInstance attribute value. |
protected static void |
stopNotifiers()
|
protected static Notifier |
tryGetNotifier(java.lang.String aNotifierName)
|
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 COPYRIGHT
protected Hashtable handlersList
protected Hashtable remoteHandlersList
protected Vector exceptionHandlerList
protected static Vector notifierList
protected static EventManager uniqueInstance
protected static Hashtable workstationList
protected static Hashtable mirrorNotifiers
protected static Hashtable bttMirrorNotifiersList
protected static boolean isCSNotificationListener
protected static Hashtable notifiers
protected JMSEvTransmit transmit
Constructor Detail |
---|
public EventManager()
Method Detail |
---|
protected static void addHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.event.Handler - 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 anEventName
DSEInvalidArgumentException
protected static void addHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aServerName) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.event.Handler - 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 anEventName
DSEInvalidArgumentException
public static MirrorNotifier getBTTMirrorNotifier(java.lang.String aNotifierName)
aNotifierName
- java.lang.String
public static void addBTTMirrorNotifier(MirrorNotifier aMirrorNotifier)
aMirrorNotifier
- com.ibm.btt.event.MirrorNotifierpublic static void removeBTTMirrorHandler(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aHandlerGlobalID) throws DSEHandlerNotFoundException
anEventName
- com.ibm.btt.event.DSEEventObjectaNotifierName
- java.lang.StringaHandlerGlobalID
- java.lang.String
DSEHandlerNotFoundException
- DSEHandlerNotFoundExceptionpublic static java.lang.Object removeBTTMirrorNotifier(java.lang.String aNotifierName)
aNotifierName
- java.lang.String
protected static void addMirrorHandlerToBTTMirrorNotifer(MirrorNotifier aMirrorNotifier, java.lang.String anEventname, MirrorHandler aMirrorHandler) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEObjectNotFoundException
DSEInvalidArgumentException
DSEInvalidRequestException
DSEObjectNotFoundException
protected static void addHandler(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aSessionId) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEObjectNotFoundException, DSEHandlerNotFoundException, DSEException
anEventName
- java.lang.String - The name of the event the client will be
interested inaNotifierName
- java.lang.String - The name of the Notifier that will produce
the event anEventNameaSessionId
- java.lang.String - The identification of the session between
client and server
DSEInvalidArgumentException
DSEInvalidRequestException
DSEObjectNotFoundException
DSEHandlerNotFoundException
DSEException
protected static void addHandlerForException(Handler aHandler) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.event.Handler
DSEInvalidArgumentException
protected static void addHandlerForException(Handler aHandler, java.lang.String aServerTID) throws DSEInvalidArgumentException
aHandler
- com.ibm.btt.event.HandleraServerTID
- java.lang.String - The TID of the server where the exception
will be originated
DSEInvalidArgumentException
protected static void addBTTMirrorHandlerForException(java.lang.String aSessionId) throws DSEInvalidRequestException, DSEObjectNotFoundException, DSEInvalidArgumentException
aSessionId
- java.lang.String - The identification of the session between
the client that has the Handler and server
DSEInvalidRequestException
DSEObjectNotFoundException
DSEInvalidArgumentException
protected static void addNotifier(Notifier aNotifier) throws DSEInvalidArgumentException
aNotifier
- com.ibm.btt.event.Notifier
DSEInvalidArgumentException
protected static void addNotifier(Notifier aNotifier, java.lang.String aTID) throws DSEInvalidArgumentException
aNotifier
- com.ibm.btt.event.NotifieraTID
- java.lang.String - The TID of the client, where there may be a
Handler interested in an event produced by the notifier
"aNotifier."
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 MirrorNotifier getMirrorNotifier(java.lang.String aNotifierName)
aNotifierName
- java.lang.String
protected static MirrorNotifier getMirrorNotifier(java.lang.String aNotifierName, java.lang.String aServerName) throws DSEObjectNotFoundException
aNotifierName
- java.lang.StringaServerName
- java.lang.String
DSEObjectNotFoundException
protected static void addMirrorNotifier(MirrorNotifier aNotifier, java.lang.String aServerName)
aServerName
- java.lang.Stringprotected static Hashtable getMirrorNotifiers()
protected static Notifier getNotifier(java.lang.String aNotifierName) throws DSEObjectNotFoundException
DSEObjectNotFoundException
protected static Vector getNotifierList()
protected static EventManager getUniqueInstance()
protected static Hashtable getWorkstationList()
public void handleCSNotificationEvent(CSNotificationEvent event)
handleCSNotificationEvent
in interface CSNotificationListener
event
- com.ibm.btt.event.CSNotificationEventprotected 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
protected static void removeHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
aHandler
- com.ibm.btt.event.HandleranEventName
- java.lang.StringaNotifierName
- java.lang.String
DSEInvalidArgumentException
DSEHandlerNotFoundException
protected static void removeHandler(Handler aHandler, java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aServerName) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
aHandler
- com.ibm.btt.event.HandleranEventName
- java.lang.StringaNotifierName
- java.lang.StringaServerName
- java.lang.String - The terminal identification of the
workstation that is going to signal the event the application
was interested in
DSEInvalidArgumentException
DSEHandlerNotFoundException
protected static void removeHandler(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aSessionId) throws DSEHandlerNotFoundException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEObjectNotFoundException
anEventName
- java.lang.String - The name of the event the client is no
longer interested inaNotifierName
- java.lang.String - The name of the Notifier that will produce
the event "anEventName"aSessionId
- java.lang.String - The identification of the session between
client and server
DSEHandlerNotFoundException
DSEInvalidArgumentException
DSEInvalidRequestException
DSEObjectNotFoundException
protected static void removeHandlerForException(Handler aHandler) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
aHandler
- com.ibm.btt.event.Handler
DSEInvalidArgumentException
DSEHandlerNotFoundException
protected static void removeHandlerForException(java.lang.String aSessionId) throws DSEInvalidRequestException, DSEObjectNotFoundException
aSessionId
- java.lang.String - The identification of the session between
the client that has the Handler and server
DSEInvalidRequestException
DSEObjectNotFoundException
protected static void removeBTTMirrorHandlerForException(java.lang.String aSessionId) throws DSEInvalidRequestException, DSEObjectNotFoundException, DSEHandlerNotFoundException
DSEInvalidRequestException
DSEObjectNotFoundException
DSEHandlerNotFoundException
protected static void removesHandlerForException(Handler aHandler, java.lang.String aServerTID) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
aHandler
- com.ibm.btt.event.HandleraServerTID
- java.lang.String - The TID of the server where the exception
will be originated
DSEInvalidArgumentException
DSEHandlerNotFoundException
protected static void removeWorkstation(java.lang.String anEventName, java.lang.String aNotifierName, java.lang.String aClientWorkstation)
anEventName
- java.lang.StringaNotifierName
- java.lang.StringaClientWorkstation
- java.lang.Stringpublic static void reset()
public static void sendException(DSEException anException)
anException
- com.ibm.btt.base.DSEExceptionprotected static void setUniqueInstance(EventManager anEventManager)
anEventManager
- com.ibm.btt.event.EventManagerprotected static Notifier tryGetNotifier(java.lang.String aNotifierName)
protected static void addNotifier(Notifier aNotifier, java.lang.String aNotifierName, java.lang.String aNotifierType)
protected static void removeNotifier(java.lang.String aNotifierName)
protected static void stopNotifiers()
public static CSServerService getCSServer()
protected static Hashtable getNotifiers()
public static void handleJMSNotificationEvent(DSEEventObject anEvent)
public static Hashtable getBTTMirrorNotifiers()
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |