Namespace org.visab.eventbus
This package contains the an event bus implementation, that is used for communicating API related events aswell as API unreleated events.
Basic communication on throughout the publish-subscribe pattern focuses on the concept of a common event bus. Publishers act like a datasource to that bus, while subscribers are data sinks. The bus itself handles the distribution of information by notifying subscribers about an event that got was published by a publisher.
Classes
APIEventBase
A base API event class, that all API events should inherit from.
APIEventBus
The APIEventBus, used for notifying subscribers of new messages to the api. Subscribers will be notified when their subscribed event occurs.
APIPublisherBase<TEvent>
The APIPublisherBase class, that all api event publishers should inherit from.
APISubscriberBase<TEvent>
The APISubscriberBase class, that all API event subscribers should inherit from.
EventBusBase<T>
An abstract base implementation of the EventPus.
GeneralEventBus
The GeneralEventBus used for publish API unrelated events.
Interfaces
IAPIEvent
The IAPIEvent interface that all API related events have to implement.
IEvent
Marker interface for events.
IPublisher<TEvent>
The IPublisher interface, that all publishers have to implement.
ISubscriber<TEvent>
The ISubscriber interface that all subscribers have to implement. This interface is needed, so that the EventBus can publish events of the exact type without having to cast at compile time.