| java.lang.Object | |
| ↳ | com.pnfsoftware.jeb.core.events.JebEventSource |
Known Direct Subclasses
|
Known Indirect Subclasses
|
The standard engines implementation of an IEventSource. Designed to emit JebEvent
s. After deserialization, the listeners list is empty, and the parent set to null (it is neither
serialized nor automatically restored).
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
JebEventSource()
Create an event with a null parent source.
| |||||||||||
|
JebEventSource(IEventSource parentSource)
Create an event source and hook it to a parent source.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
addListener(IEventListener listener)
Register a listener.
| ||||||||||
| int |
countListeners()
Get the numbers of objects listening to this event source.
| ||||||||||
| List<IEventListener> |
getListeners()
Get a copy of the list of listeners.
| ||||||||||
| IEventSource |
getParentSource()
Get the parent source.
| ||||||||||
| void |
insertListener(int index, IEventListener listener)
Register a listener.
| ||||||||||
| void | notifyListeners(JebEvent e, boolean notifyParent) | ||||||||||
| void |
notifyListeners(IEvent e)
Notify listeners that an event has occurred.
| ||||||||||
| void | notifyListeners(JebEvent e) | ||||||||||
| void |
removeListener(IEventListener listener)
Unregister a listener.
| ||||||||||
| void |
setParentSource(IEventSource parentSource)
Set a parent source.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.pnfsoftware.jeb.util.events.IEventSource
| |||||||||||
Create an event with a null parent source.
Create an event source and hook it to a parent source. When this source notifies its observers of an event, the "parent source" will also be notified (regardless of the "parent source" being a listener of that observable).
| parentSource | source that generated the event |
|---|
Register a listener. The listener is appended to the existing list of listeners. The implementor may allow duplicates.
| listener | a listener of events generated by this source |
|---|
Get the numbers of objects listening to this event source.
Get the parent source.
Register a listener. The implementor may allow duplicates.
| index | insertion point |
|---|---|
| listener | a listener of events generated by this source |
Notify listeners that an event has occurred.
| e | the event to be propagated |
|---|
Unregister a listener. If the implementor allows duplicates in addListener(), it should deal with those consistently.
| listener | the listener to be removed |
|---|
Set a parent source.
| parentSource | the optional parent source |
|---|