IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Interface ProcessorNotifier

All Known Subinterfaces:
Action, CommonCommunicationsService, MQConnectionService
All Known Implementing Classes:
BTTProcessorNotifier, BTTXUIProcessor, CheckAction, CommunicationsPool, CSClient, DSEAction, DSEHtmlProcessor, DSEOperationProcessor, DSEProcessor, DSEStep, ExecuteOperationAct, ExecuteSubflowAct, ExecuteXUISubflowAct, GenericPool, JDBCJournal, JDBCService, JDBCServicesConnectionManager, JDBCStore, JDBCTable, Journal, LDAPService, MQConnection, Service, StartAction, Store

public interface ProcessorNotifier

This interface provides its implementors with the capability to send and process event notifications. A class that sends event notifications must implement the Notifier interface or be a subclass of DSENotifier. The Notifier constructor registers a new Notifier instance to the EventManager. The EventManager can then manage the registering of Handlers for local or remote events in a transparent way for the application. Each class that includes the Handler interface must implement all of these methods.


Method Summary
 void addHandler(ProcessorHandler aHandler, java.lang.String anEventName)
          This method should add aHandler to the chain of Handlers for the notifier instance.
 Hashtable getHandlersList()
          Returns the handlersList attribute value.
 java.lang.String getName()
          Returns the name attribute value.
 void removeHandler(ProcessorHandler aHandler, java.lang.String anEventName)
          This method must remove aHandler from the chain of that specific Class instance if the event it is interested in matches anEventName.
 void setName(java.lang.String aName)
          Sets the name attribute to aName.
 void signalEvent(java.lang.String anEventName)
          Calls the dispatch method of the first Handler registered for the event anEventName and proceeds according to the defined event propagation criteria following the chain of Handlers.
 void signalEvent(java.lang.String anEventName, Hashtable aParametersTable)
          Calls the dispatch method of the first Handler registered for the event anEventName and proceeds according to the defined event propagation criteria following the chain of Handlers.
 void terminate()
          This is a housekeeping process for Notifier instances.
 

Method Detail

addHandler

void addHandler(ProcessorHandler aHandler,
                java.lang.String anEventName)
                throws DSEInvalidArgumentException
This method should add aHandler to the chain of Handlers for the notifier instance. If the Handler is interested in any event signaled by this Notifier, the event name should be set to "allEvents". The Handler is added to the first position of the chain so that it is the first Handler to receive the event when the event occurs. This method should generate the event "handlerAddedEvent" and throws a "DSEInvalidArgumentException" when "aHandler" or "anEventName" are null.

Throws:
DSEInvalidArgumentException

getHandlersList

Hashtable getHandlersList()
Returns the handlersList attribute value.


getName

java.lang.String getName()
Returns the name attribute value.


removeHandler

void removeHandler(ProcessorHandler aHandler,
                   java.lang.String anEventName)
                   throws DSEInvalidArgumentException,
                          BTTProcessorHandlerNotFoundException
This method must remove aHandler from the chain of that specific Class instance if the event it is interested in matches anEventName. If anEventName is allEvents all entries in the list for that specific handler will be removed. This operation must generate: - a DSEInvalidArgumentException if aHandler or anEventName are null. - a DSEHandlerNotFoundException if aHandler or anEventName are not found in the handlersList.

Throws:
DSEInvalidArgumentException
BTTProcessorHandlerNotFoundException

setName

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


signalEvent

void signalEvent(java.lang.String anEventName)
                 throws DSEInvalidArgumentException
Calls the dispatch method of the first Handler registered for the event anEventName and proceeds according to the defined event propagation criteria following the chain of Handlers. This method will create a DSEEventObject with a name of anEventName and source as the Notifier that signaled the event. Any notifier interface implementors must define themselves, if required, as a source of a standard Java event (which awakes all the listeners waiting for it). The signalEvent method should then also add the statement that fires the event in the standard Java way. Additional methods to add and remove listeners must also be implemented as defined in the Java developement guide. This method throws a DSEInvalidArgumentException.

Throws:
DSEInvalidArgumentException

signalEvent

void signalEvent(java.lang.String anEventName,
                 Hashtable aParametersTable)
                 throws DSEInvalidArgumentException
Calls the dispatch method of the first Handler registered for the event anEventName and proceeds according to the defined event propagation criteria following the chain of Handlers. This method will create a DSEEventObject with name of anEventName and the attributes defined in the Hashtable aParametersTable. Any notifier interface implementors must define themselves, if required, as a source of an standard Java event (which awakes all the listeners waiting for it). The signalEvent method should then also add the statement that fires the event in the standard Java way. Additional methods to add and remove listeners must also be implemented as defined in Java developement guide. This method throws a "DSEInvalidArgumentException."

Throws:
DSEInvalidArgumentException

terminate

void terminate()
               throws DSEException
This is a housekeeping process for Notifier instances. This is called either from the application or from the context when it is destroyed or unchained. Subclasses should overwrite this implementation to perform whatever actions are needed to release all the resources acquired by the notifier.

Throws:
DSEException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009