|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbpm.util.DefaultObservable
public class DefaultObservable
Field Summary | |
---|---|
protected java.util.List<Listener> |
listeners
|
Constructor Summary | |
---|---|
DefaultObservable()
|
Method Summary | |
---|---|
void |
addListener(Listener listener)
subscribes a listener to every event |
Listener |
addListener(Listener listener,
java.util.List<java.lang.String> eventNames)
subscribes the listener to receive event notifications only if event matches one of the given eventNames. |
Listener |
addListener(Listener listener,
java.lang.String eventName)
subscribes the listener to receive event notifications only of the given eventName. |
void |
fire(java.lang.String eventName)
dispatches an event to the listeners. |
void |
fire(java.lang.String eventName,
java.lang.Object info)
dispatches an event to the listeners. |
void |
removeListener(Listener listener)
removes a listener that was subscribed for every event |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.List<Listener> listeners
Constructor Detail |
---|
public DefaultObservable()
Method Detail |
---|
public void addListener(Listener listener)
Observable
addListener
in interface Observable
listener
- is the object that will be notified on firing
of events.public void removeListener(Listener listener)
Observable
removeListener
in interface Observable
public Listener addListener(Listener listener, java.lang.String eventName)
Observable
addListener
in interface Observable
listener
- is the object that will be notified on firing
of events.eventName
- is the type of events the listener is interested in and this is mandatory.
FilterListener
that is created as a wrapper for the given listener. That handle
might be necessary to remove the listener later on.public Listener addListener(Listener listener, java.util.List<java.lang.String> eventNames)
Observable
addListener
in interface Observable
listener
- is the object that will be notified on firing
of events.eventNames
- is the type of events the listener is interested in and this is mandatory.
FilterListener
that is created as a wrapper for the given listener. That handle
might be necessary to remove the listener later on.public void fire(java.lang.String eventName)
Observable
fire
in interface Observable
eventName
- identifies the type of event and is allowed to be null.public void fire(java.lang.String eventName, java.lang.Object info)
Observable
fire
in interface Observable
eventName
- identifies the type of event and is allowed to be null.info
- is the optional information that the observable wants to pass to it's listeners.
Each observable should indicate which type of info it's passing for each event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |