|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
IEventBusListener | An interface for loading a specific class from a given URL (which is probably a Jar file). |
IEventDistributor | An interface for distributing events to any listeners. |
Class Summary | |
EventBus | Master control unit which is in charge of registering event listeners, deregistering event listeners, and distributing events. |
EventBusEvents | The event bus's internally defined events. |
EventBusEvents.ListenerData | |
EventBusObject | The event object which is passed around. |
LocalEventDistributor | The default distributor - sends events asynchronously in the current thread to all listeners. |
ThreadedLocalEventDistributor | Sends events asynchronously in a separate event thread to all local listeners. |
The eventbus package allows for a dynamic application to distribute application events in an infinitely extensible way.
All parts of the application which need to tie into the system must register themselves to the eventbus manager, requesting to listen to various events.
When an event is posted, all listeners will receive the event. There is no guarantee as to the order, or as to which thread the event will be sent in. Indeed, there is no guarantee to a synchronized execution of event listeners.
The system is exendable - any kind of event distribution system can be added. By default, a local distribution system is loaded. However, any additional systems may be "plugged" into the bus via the IEventDistributor interface.
Eventually, the package should be extended to allow for the events to be distributed over a network. The application would need to define in the Java environment (i.e. -D command-line options) whether it is a server or client, and the listen-to and connect-to ports (and server name for the client).
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |