|
IBM Branch 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
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
BTT Mirror Notifier list which keep all the server side BTT Notifiers' information. |
protected static boolean |
isCSNotificationListener
A flag indicates whehter event manager is CSNotificationListener. |
protected JMSEvTransmit |
transmit
JMSEvTransmit is for EventManager to send JMS messages to message queue. |
protected static EventManager |
uniqueInstance
EventManager unique instance. |
Constructor Summary | |
---|---|
EventManager()
|
Method Summary | |
---|---|
protected static void |
addBTTMirrorHandlerForException(java.lang.String aSessionId)
Registers a Handler for exceptions originating from a server or external server. |
static void |
addBTTMirrorNotifier(MirrorNotifier aMirrorNotifier)
Adds a BTT Mirror Notifier to BTT Mirror Notifier list. |
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 |
addMirrorHandlerToBTTMirrorNotifier(MirrorNotifier aMirrorNotifier,
java.lang.String anEventname,
MirrorHandler aMirrorHandler)
Adds BTT Mirrior Handler to the BTT Mirror Notifier in which BTT Mirror Handler interests. |
protected static void |
addNotifier(Notifier aNotifier,
java.lang.String aTID)
Adds a Notifier to the list of Notifiers. |
static MirrorNotifier |
getBTTMirrorNotifier(java.lang.String aNotifierName)
Gets BTT Mirror Notifier from BTT Mirror Notifier list. |
static Hashtable |
getBTTMirrorNotifiers()
Gets BTT Mirror Notifier list. |
static CSServerService |
getCSServer()
Gets CSServer instance. |
protected static EventManager |
getUniqueInstance()
Returns the unique instance of EventManager running on the application environment. |
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 gets singal event request from queue, it will invoke this method to get Mirror Notifier to singal 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)
Removes BTT Mirror Handler which handles an exception event. |
static java.lang.Object |
removeBTTMirrorNotifier(java.lang.String aNotifierName)
Removes a BTT Mirror Notifier from BTT Mirror Notifier list. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static EventManager uniqueInstance
protected static Hashtable bttMirrorNotifiersList
protected static boolean isCSNotificationListener
protected JMSEvTransmit transmit
Constructor Detail |
public EventManager()
Method Detail |
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 addMirrorHandlerToBTTMirrorNotifier(MirrorNotifier aMirrorNotifier, java.lang.String anEventname, MirrorHandler aMirrorHandler) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEObjectNotFoundException
aMirrorNotifier
- com.ibm.btt.event.MirrorNotifieranEventname
- java.lang.StringaMirrorHandler
- com.ibm.btt.event.MirrorHandler
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 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
DSEInvalidArgumentException
DSEInvalidRequestException
DSEObjectNotFoundException
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 EventManager getUniqueInstance()
public void handleCSNotificationEvent(CSNotificationEvent event)
handleCSNotificationEvent
in interface CSNotificationListener
event
- com.ibm.btt.event.CSNotificationEventprotected static void removeBTTMirrorHandlerForException(java.lang.String aSessionId) throws DSEInvalidRequestException, DSEObjectNotFoundException, DSEHandlerNotFoundException
aSessionId
- java.lang.String
DSEInvalidArgumentException
DSEObjectNotFoundException
DSEHandlerNotFoundException
DSEInvalidRequestException
public 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.EventManager.public static CSServerService getCSServer()
public static void handleJMSNotificationEvent(DSEEventObject anEvent)
anEvent
- com.ibm.btt.event.DSEEventObjectpublic static Hashtable getBTTMirrorNotifiers()
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |