Blackboard is a simplistic generic event system.
A Notifier can fire an Event that will be heard by a Listener (or many), wherever it may be. This is very convenient in GUI-applications, where you don't want to, or even are unable to, directly connect a notifier with a listener.
There is no singleton mechanism built into Blackboard - that has been left up to the implementor. Instead of using a simple static final field, use a proper ThreadLocal implementation. This is especially important for Java EE projects. You can find an example of its usage in this project's
example source path.
- JDK 1.5
- Google Collections is required for versions 1.1.0-1.2.0
- It's now allowed to register several events to one listener
- Registering abstract Events is disallowed
- API is incompatible with eariler releases
- Notifier is removed completely
- com.github.wolfie.blackboard.Event is now an interface
- Blackboard.register() now accepts only interface-Listeners
- The example application is cleaned up
- Dependency for Google Collections is removed
Changed the hashmap to have soft values instead of weak ones
A class now can implement many Listeners
Fixed memory a leak. This leads to a dependency for Google Collections.
Fixed a bug where implementations of client Listener interfaces were not triggered.