Pustike EventBus is a fork of Guava EventBus, which is probably the most commonly known event bus for Java. Most of the documentation here and test cases are from Guava itself.
EventBus is a library providing publisher/subscriber pattern for loose coupling between components(event senders and receivers), by sending messages to each other indirectly. Some objects register with the bus to be notified when certain events of interest occur. And some publish events on the bus. The bus notifies each of the registrants when the event is published. So registrant objects and event-source objects need not know about each other directly. Each may join or depart the bus at any time. Thus it enables central communication between components, simplifies the code and removes direct dependencies.
The Guava Project contains several core libraries and is distributed as a single module that has a size of ~2.2MB (as of v19.0). An application using only the EventBus will also need to include the full Guava dependency. So, this is an effort to extract only the event bus library from Guava project without any other dependencies.
This library also provides few additional features / changes, like:
@Subscribe(threadSafe = true)
instead of @AllowConcurrentEvents
Documentation:
Download:
The most recent release is v1.5.0 (2018-09-28), and it is available from Maven central repository.
To add it as a dependency in Maven builds, use the following:
<dependency>
<groupId>io.github.pustike</groupId>
<artifactId>pustike-eventbus</artifactId>
<version>1.5.0</version>
</dependency>
Or, download the latest JAR(~20kB) from Maven Central.
License: This library is published under the Apache License, Version 2.0