| |
|
| java.lang.Object org.blojsom.event.SimpleEventBroadcaster
SimpleEventBroadcaster | public class SimpleEventBroadcaster implements EventBroadcaster(Code) | | SimpleEventBroadcaster.
Events are broadcast to each event in a separate thread so that the broadcaster is not a bottleneck.
No defined order is set for how each event will receive an event, so you should not assume any order
in listeners being called. No steps are taken to ensure a event does not receive an event if it is
removed at the same time an event is being broadcast.
The addition of the
SimpleEventBroadcaster.processEvent(Event) method adds the capability for components to have an
event processed after the call instead of asynchronously as with the
SimpleEventBroadcaster.broadcastEvent(Event) method.
author: David Czarnecki version: $Id: SimpleEventBroadcaster.java,v 1.2 2007/01/17 02:35:17 czarneckid Exp $ since: blojsom 3.0 |
Inner Class :protected class EventHandler | |
SimpleEventBroadcaster | public SimpleEventBroadcaster()(Code) | | Default constructor.
|
addListener | public void addListener(Listener listener)(Code) | | Add a event to this event broadcaster
Parameters: listener - Listener |
broadcastEvent | public void broadcastEvent(Event event)(Code) | | Broadcast an event to all listeners
Parameters: event - Event to be broadcast to all listeners |
processEvent | public void processEvent(Event event)(Code) | | Process an event with all listeners
Parameters: event - Event to be processed by all listeners |
removeListener | public void removeListener(Listener listener)(Code) | | Remove a event from this event broadcaster
Parameters: listener - Listener |
|
|
|