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
2.2.0
- It's now allowed to register several events to one listener
2.0.1
- Registering abstract Events is disallowed
2.0.0
- 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
1.2.0
Added logging.
1.1.2
Changed the hashmap to have soft values instead of weak ones
1.1.1
A class now can implement many Listeners
1.1.0
Fixed memory a leak. This leads to a dependency for Google Collections.
1.0.1
Fixed a bug where implementations of client Listener interfaces were not triggered.
1.0.0
First version