|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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(Handler 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(Handler 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 |
public void addHandler(Handler aHandler, java.lang.String anEventName) throws DSEInvalidArgumentException
This method should generate the event handlerAddedEvent and throws a DSEInvalidArgumentException when aHandler or anEventName are null.
public Hashtable getHandlersList()
public java.lang.String getName()
public void removeHandler(Handler aHandler, java.lang.String anEventName) throws DSEInvalidArgumentException, DSEHandlerNotFoundException
If anEventName is "allEvents" all entries in the list for that specific handler will be removed. This operation must generate the event handlerRemovedEvent and a DSEHandlerNotFoundException when aHandler cannot be found in the chain of handlers for this specific Class and event name. This method must generate :
public void setName(java.lang.String aName)
public void signalEvent(java.lang.String anEventName) throws DSEInvalidArgumentException
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 to 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.
public void signalEvent(java.lang.String anEventName, Hashtable aParametersTable) throws DSEInvalidArgumentException
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.
public void terminate() throws DSEException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |