org.as2lib.core.BasicClass +--org.as2lib.env.event.SimpleEventListenerSource +--org.as2lib.env.event.broadcaster.SimpleConsumableEventBroadcaster
ConsumableEventBroadcaster
SimpleConsumableEventBroadcaster
broadcasts an event to listeners until
the event has been consumed.
The dispatching of the event will be stopped as soon as the event is consumed.
The event can be consumed by calling the appropriate method on the
ConsumableEventInfo
instance passed to the dispatch
method and
from there to the appropriate event method on the listeners.
new SimpleConsumableEventBroadcaster()
addAllListeners(), addListener(), getAllListeners(), hasListener(), removeAllListeners(), removeListener()
public function dispatch(eventInfo:EventInfo):Void
Dispatches the passed-in eventInfo
to all listeners until the event has
been consumed.
The name returned by the EventInfo.getName method of the passed-in
eventInfo
is used as event method name to invoke on the listeners.
The passed-in eventInfo
is also passed as parameter to the listeners'
event methods.
The event dispatching will be stopped as soon as the event is consumed. An
event can be consumed by calling the appropriate method on the passed-in
eventInfo
that must be, if the consumption of events shall be enabled,
an instance of type ConsumableEventInfo.
eventInfo | the event to dispatch to all listeners |
EventExecutionException | if a listener threw an exception during dispatching |