IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.event
Class MirrorNotifier

java.lang.Object
  extended by com.ibm.btt.event.MirrorNotifier
All Implemented Interfaces:
Notifier

public class MirrorNotifier
extends java.lang.Object
implements Notifier

A Mirror Notifier represents a BTT Notifier in Event Manager. When a BTT Notifier is created, a corresponding Mirror Notifier is also created and registered in Event Manager.


Field Summary
static java.lang.String COPYRIGHT
           
protected  java.util.Hashtable handlersList
          Handler list stores all the handlers which interest in this notifer.
protected  java.lang.String name
          This constructor creates a MirrorNotifier object.
 
Constructor Summary
MirrorNotifier()
           
MirrorNotifier(java.lang.String aName)
          This constructor creates a MirrorNotifier object with its name attribute set to aName.
 
Method Summary
protected  void addBTTMirrorHandler(MirrorHandler aHandler, java.lang.String anEventName)
          Returns true if the MirrorNotifier has any handler in the handlers list waiting for any of its events.
protected  void addHandler(Handler aHandler, java.lang.String anEventName)
          Adds an aHandler to the chain of handlers for the specific instance of DSENotifier.
 MirrorHandler containsMirrorHandler(java.lang.String anEventName, java.lang.String GlobalHandlerID)
          Checks whether Mirror Notifier's handler list for a specified event contains a specified MirrorHandler.
 java.util.Hashtable getHandlersList()
          Returns the handler list .
 java.lang.String getName()
          Returns the Mirror Notifier's name.
 void removeBTTMirrorHandler(java.lang.String anEventName, java.lang.String aHandlerGlobalID)
          Removes a BTT Mirror Handler from the BTT Mirror Handler List.
protected  void removeHandler(Handler aHandler, java.lang.String anEventName)
          Removes aHandler from the chain of handlers for that specific DSENotifier instance if the event it is interested in matches anEventName.
 void setName(java.lang.String aName)
          Sets the notifier name to aName.
protected  void signalEvent(DSEEventObject anEvent)
          This method is to fire the event.
 void signalEvent(java.lang.String anEventName)
          This method is to fire the event.
 void signalEvent(java.lang.String anEventName, java.util.Hashtable params)
          This method is to fire the event.
 void terminate()
          This is a method in interface com.ibm.btt.event.Notifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

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

name

protected java.lang.String name
This constructor creates a MirrorNotifier object.


handlersList

protected java.util.Hashtable handlersList
Handler list stores all the handlers which interest in this notifer.

Constructor Detail

MirrorNotifier

public MirrorNotifier()

MirrorNotifier

public MirrorNotifier(java.lang.String aName)
This constructor creates a MirrorNotifier object with its name attribute set to aName.

Parameters:
aName - java.lang.String
Method Detail

addBTTMirrorHandler

protected void addBTTMirrorHandler(MirrorHandler aHandler,
                                   java.lang.String anEventName)
                            throws DSEInvalidArgumentException
Returns true if the MirrorNotifier has any handler in the handlers list waiting for any of its events.

Throws:
DSEInvalidArgumentException

containsMirrorHandler

public MirrorHandler containsMirrorHandler(java.lang.String anEventName,
                                           java.lang.String GlobalHandlerID)
Checks whether Mirror Notifier's handler list for a specified event contains a specified MirrorHandler.

Parameters:
anEventName - java.lang.String
GlobalHandlerID - java.lang.String
Returns:
com.ibm.btt.event.MirrorHandler

addHandler

protected void addHandler(Handler aHandler,
                          java.lang.String anEventName)
                   throws DSEInvalidArgumentException
Adds an aHandler to the chain of handlers for the specific instance of DSENotifier.

The handler is located in the first position of the chain so it is the first handler to receive the event when signaled.

The handler, which is added to the chain of handlers using this operation, is registered for the event anEventName to be signaled by the DSENotifier. If it is interested in any event signaled by this notifier, then the event name must be set to allEvents. This method generates a DSEInvalidArgumentException when aHandler or anEventName are null.

Throws:
DSEInvalidArgumentException

getHandlersList

public java.util.Hashtable getHandlersList()
Returns the handler list .

Returns:
java.util.Hashtable

getName

public java.lang.String getName()
Returns the Mirror Notifier's name.

Specified by:
getName in interface Notifier
Returns:
name java.lang.String

removeBTTMirrorHandler

public void removeBTTMirrorHandler(java.lang.String anEventName,
                                   java.lang.String aHandlerGlobalID)
                            throws DSEHandlerNotFoundException
Removes a BTT Mirror Handler from the BTT Mirror Handler List.

Parameters:
anEventName - java.lang.String
aHandlerGlobalID - java.lang.String
Throws:
DSEHandlerNotFoundException

removeHandler

protected void removeHandler(Handler aHandler,
                             java.lang.String anEventName)
                      throws DSEInvalidArgumentException,
                             DSEHandlerNotFoundException
Removes aHandler from the chain of handlers for that specific DSENotifier instance if the event it is interested in matches anEventName.

If anEventName is allEvents all entries in the list for that specific handler are removed. This method can generate a:

- DSEInvalidArgumentException if aHandler or anEventName are null. - DSEHandlerNotFoundException if aHandler or anEventName are not found in the handlersList.

Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

setName

public void setName(java.lang.String aName)
Sets the notifier name to aName.

Specified by:
setName in interface Notifier
Parameters:
aName - java.lang.String

signalEvent

protected void signalEvent(DSEEventObject anEvent)
This method is to fire the event. It takes DSEEventObject as a parameter. When this method is invoked , the instance of DSEEventObject is sent to event manager via a message queue.

Parameters:
anEvent - com.btt.event.DSEEventObject

signalEvent

public void signalEvent(java.lang.String anEventName)
                 throws DSEInvalidArgumentException
This method is to fire the event. The fired event name is as specified name anEventName.

Specified by:
signalEvent in interface Notifier
Parameters:
anEventName - java.lang.String
Throws:
DSEInvalidArgumentException

signalEvent

public void signalEvent(java.lang.String anEventName,
                        java.util.Hashtable params)
                 throws DSEInvalidArgumentException
This method is to fire the event. The fired event name is as specified name anEventName and the second parameter is a Hashtable params in which user can put any information that needs to go with event object to event manager.

Specified by:
signalEvent in interface Notifier
Parameters:
anEventName - java.lang.String
params - java.util.Hashtable
Throws:
DSEInvalidArgumentException

terminate

public void terminate()
               throws DSEException
This is a method in interface com.ibm.btt.event.Notifier. It does nothing in Mirror Notifier.

Specified by:
terminate in interface Notifier
Throws:
DSEException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009