|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public Handler dispatchEvent(DSEEventObject anEvent)
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.
public void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException
This method throws a DSEInvalidArgumentException.
public void handleEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws DSEInvalidArgumentException
This method throws a DSEInvalidArgumentException.
public void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
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.
public void stopHandlingEvent(java.lang.String anEventName, java.lang.String aNotifierName, Context aContext, java.lang.String aTID) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
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 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |