ClassBus is an event delivery API written using Java (TM) 1.5. It decouples event producers from consumers.
The EventService interface is the central "bus". You can publish any kind of object to an EventService instance like this:
myEventService.publish("someChannelName", aMessageObject);Subscribers receive events from the EventService. A subscriber must implement a simple interface:
public interface EventSubscriber {
void onEvent(T event);
}Subscribers attach to the bus through a combination of the channel name and event type. Subscribers can listen to particular channels by exact name match, regular expression, or any other matching strategy you can dream up. You can similarly match on event type, subtype, or some other pluggable matching strategy.
Finally, events are delivered via a DeliveryStrategy interface. Out of the box, we provide an Event Dispatch Thread strategy that ensures subscribers are notified on the EDT.
30 Day Summary not available |
12 Month Summary not available |
Copyright
©
2013
Black Duck Software, Inc.
and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a
Creative Commons Attribution 3.0 Unported License
. Ohloh
®
and the Ohloh logo are trademarks of
Black Duck Software, Inc.
in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.