The EventBus is a simple but powerful publish/subscribe API with annotations that allows POJOs to communicate with each other anywhere in a JVM without having to refer to each other. EventBus subscriptions are based on class semantics and/or string (topic) matching. The EventBus is fit for general purpose usage and has extensions for UI development.
The publish/subscribe pattern is commonly used to decouple components, make testing easier, and program by contract. It replaces the tight coupling introduced by explicit listeners with a flexible loosely coupled design. The EventBus is production ready and used in many applications, including financial UIs, scientific simulations, and the most popular Java desktop application, Limewire. The EventBus is well tested and has very good documentation.
The EventBus is not a JMS competitor. The EventBus is for pub/sub communication within a VM. The EventBus is often used by JMS listeners to route events internally once they are pulled off the JMS queue or topic.
EventBus 1.x is stable, well tested, well documented and suitable for general purpose Java applications and UIs, including Swing, SWT, and Apache Pivot.
The article demonstrates common UI pub/sub patterns using Apache Pivot. No matter what UI technology you use, this article will show you what the EventBus can do for your UIs, and you'll learn about Apache Pivot along the way.