Version 15, last updated by Tilmann Kuhn at November 06, 2011 08:14 UTC
Events4J
Events4J is a simple and generic Java API that mimics the delegates (Action, Func) and events known from C# and .NET in Java to facilitate the development of loosely coupled functional units.
It is open source software released under the terms of the MIT License.
Download
Events4J can be obtained form the File Downloads or the Git Repository.
Motivation
Problems solved:
- Introduce delegates and events as Java types, that are not available in the SDK
- Have minimal dependencies between event provider and consumer unlike traditional interface based Java event listeners
- Provide convenient way to call Java methods asynchronously
Design goals:
- Minimum number of interfaces that are still suitable for most situations
- Generic implementation adapts to most use cases
- Allow flexible use through adapters while sticking to the Single Responsibility Principle
- Usable in GWT applications
- Zero dependencies
Non-goals:
- Provide a publish subscribe event bus (maybe EventBus is something for you)
- Provide automatic wiring through annotations and parameter types
How To Use It
- Learn by example in the Tutorial.
- Browse the JavaDoc
- If you are looking for help, please post a message to the Message Board.
Development Tools
- Eclipse
- FindBugs (Static code analysis)
- EclEmma (Code Coverage)
- Infinitest (Continuous Testing)
- Ant (Automated build)
Release History
-
1.2.1 Fixes
- Fixed GWT support
-
1.2 Extensions
- Added asynchronous action calling
- Fixes in build script
-
1.1 Repackaged, Extensions
- Added GWT support
- Splitted JARs into standard, asynchronous and GWT
- Added Event support for events with single subscribers only
-
1.0 First final release
- Completed JavaDoc
- Added Executor selection for EventAsyncDistributor
- 0.9 First preview release