An event mechanism
Java
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
META-INF
example/com/github/wolfie/blackboard/example
src/com/github/wolfie/blackboard
test/com/github/wolfie/blackboard
.gitignore
README.mkdn
blackboard-2.2.0.jar
build.xml

README.mkdn

Blackboard

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.

Caveats

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.

Dependencies

Changelog

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