The Guava EventBus is a Java library owned by Google. It is a event broadcasting system which implements an event/listener pattern.
- Provides a mechanism for loose coupling between objects.
- No returns codes/status/exceptions can be returned from eventBus.post(). This is an advantage that the oberserver pattern has over an event bus, as it can return values/catch excpetions.
Exceptions thrown by event handlers will not be caught by the function which called eventBus.post().
Exception support has been discussed in Issue 766 in the Guava GitHub repository.
Posted: June 15th, 2016 at 10:28 am
Last Updated on: June 15th, 2016 at 4:20 pm