|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.geworkbench.engine.config.events.EventSource
public abstract class EventSource
Base class for all application plugins that throw events. Maintains an event
dispatching registry (an implementation of ListenerRegistry) that manages which components should receive which events.
In order to receive an event of type XXX from this event source, a component must:
AppEventListener that can handle
events of the XXX type.
| Constructor Summary | |
|---|---|
EventSource()
|
|
| Method Summary | |
|---|---|
void |
addEventListener(java.lang.Class listenerClass,
AppEventListener listener)
Delegates to the same name mathod of coupledListenerRegistry. |
void |
debugPrint()
For debugging purposes only. |
java.lang.Class[] |
getEventsForListener(AppEventListener listener)
Delegates to the same name mathod of coupledListenerRegistry. |
AppEventListener[] |
getListenersForEvent(java.lang.Class listenerClass)
Delegates to the same name mathod of coupledListenerRegistry. |
void |
removeListener(AppEventListener listener)
Delegates to the same name method of coupledListenerRegistry. |
void |
throwEvent(java.lang.Class listenerClass,
java.lang.String method,
Event event)
Implementation of application event firing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventSource()
| Method Detail |
|---|
public void addEventListener(java.lang.Class listenerClass,
AppEventListener listener)
throws ListenerEventMismatchException,
AppEventListenerException
coupledListenerRegistry.
ListenerEventMismatchException
AppEventListenerException
public AppEventListener[] getListenersForEvent(java.lang.Class listenerClass)
throws AppEventListenerException
coupledListenerRegistry.
AppEventListenerExceptionpublic void removeListener(AppEventListener listener)
coupledListenerRegistry.
public java.lang.Class[] getEventsForListener(AppEventListener listener)
coupledListenerRegistry.
public void throwEvent(java.lang.Class listenerClass,
java.lang.String method,
Event event)
throws AppEventListenerException
listenerClass that have registered
themselves with this EventSource object, and (2) all listeners
that have requested to listening to events of this type in a broadcast mode.
The event is thrown
by invoking the method on the corresponding listener and passsing
event as an argument.
- Parameters:
listenerClass - The Class of the listener. This class
is expected to be implementing AppEventListener.method - event -
- Throws:
AppEventListenerException
public void debugPrint()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||