IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.base
Interface Handler

All Known Subinterfaces:
State
All Known Implementing Classes:
BTTXUIState, ConnectionHandler, DSEHandler, DSEHtmlState, DSEOperationState, DSEState, DSESyncProcState, HtmlProcessorManager, MirrorHandler, ProcessorManager

public interface Handler

This interface is used by classes to process the events generated by Notifier instances. These Handler classes are organized by the EventManager or a specific Notifier in a chain structure that stores information about the event in which they are interested and, in the case of the EventManager, the component that fires the event. The Handler classes must have an attribute named "handleEventFrom." This attribute identifies the remote workstation that is the source of the events. The Handler, when it receives control to dispatch the event, may or may not process the event before passing the event to the next handler in the chain or stopping the event propagation. Each class that includes the Handler interface must implement all of these methods.


Method Summary
 Handler dispatchEvent(DSEEventObject anEvent)
          Checks to see if the Handler is interested in the event.
 void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext)
          Indicates that the Handler is interested in the event anEventName.
 void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID)
          Indicates that the Handler is interested in the event anEventName.
 void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext)
          Removes the Handler from the list of Handlers for the specific event.
 void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID)
          Removes the Handler from the list of Handlers for the specific event.
 

Method Detail

dispatchEvent

Handler dispatchEvent(DSEEventObject anEvent)
Checks to see if the Handler is interested in the event. If it is, the event is processed. If the method returns This, the Notifier passes the event to the next Handler in the chain. If the method returns null, the event is not propagated. This method is called when a Notifier generates the event anEvent. The event anEvent contains relevant data, such as the source of the event and the event name, to be used by the event Handler.


handleEvent

void handleEvent(java.lang.String anEventName,
                 java.lang.String aNotifierName,
                 Context aContext)
                 throws DSEInvalidArgumentException
Indicates that the Handler is interested in the event anEventName. This method should call the EventManager class to register the Handler as interested in the event anEventName from the Notifier aNotifierName. This method throws a DSEInvalidArgumentException.

Throws:
DSEInvalidArgumentException

handleEvent

void handleEvent(java.lang.String anEventName,
                 java.lang.String aNotifierName,
                 Context aContext,
                 java.lang.String aTID)
                 throws DSEInvalidArgumentException
Indicates that the Handler is interested in the event anEventName. This method should call the EventManager class that will register the Handler interest in the event anEventName from the Notifier aNotifierName, but only if the event is produced in the remote workstation identified by aTID. The aTID parameter is used when the application has a session with different remote workstations. This method throws a "DSEInvalidArgumentException."

Throws:
DSEInvalidArgumentException

stopHandlingEvent

void stopHandlingEvent(java.lang.String anEventName,
                       java.lang.String aNotifierName,
                       Context aContext)
                       throws DSEInvalidArgumentException,
                              DSEHandlerNotFoundException
Removes the Handler from the list of Handlers for the specific event. If the event name is allEvents, the Handler is completely removed from the list of Handlers for that Notifier. The method should invoke an EventManager method that checks whether the Notifier is local or remote. In the first case, it calls the Notifier to remove the Handler from its list of Handlers for that specific event. In the second case, the EventManager will itself remove the Handler from its list of handlers. This method throws a "DSEInvalidArgumentException" and a "DSEHandlerNotFoundException."

Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

stopHandlingEvent

void stopHandlingEvent(java.lang.String anEventName,
                       java.lang.String aNotifierName,
                       Context aContext,
                       java.lang.String aTID)
                       throws DSEInvalidArgumentException,
                              DSEHandlerNotFoundException
Removes the Handler from the list of Handlers for the specific event. If the event name is "allEvents," the Handler is removed from the list of Handlers for that Notifier. The method should invoke an EventManager method that checks whether the Notifier is local or remote. In the first case, it calls the Notifier to remove the Handler from its list of Handlers for that specific event. In the second case, the EventManager will itself remove the Handler from its list of Handlers. If no more Handlers in that workstation are waiting for the event, the EventManager then calls the remote EventManager to deregister interest in a remote event. From the aTID parameter, the EventManager knows the client/server mechanism instance to use to communicate with the server workstation. This method throws a DSEInvalidArgumentException and a DSEHandlerNotFoundException.

Throws:
DSEInvalidArgumentException
DSEHandlerNotFoundException

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2010