Package org.refcodes.eventbus
Interface EventBus
-
- All Superinterfaces:
DispatchStrategyAccessor,org.refcodes.observer.EventMatcher<BusEvent>,GenericBusObservable<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData>,GenericBusPublisher<BusEvent>,GenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>,org.refcodes.component.HandleLookup<BusEvent,org.refcodes.observer.Observer<BusEvent>>,org.refcodes.matcher.Matcher<BusEvent>,org.refcodes.observer.Publisher<BusEvent>
- All Known Implementing Classes:
EventBusImpl
public interface EventBus extends GenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>
TheEventBusdefines a predefinedGenericEventBustailored to use theActionMetaDataEventas event type to use. This grants interoperability with otherActionMetaDataEventbased systems.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
DispatchStrategyAccessor.DispatchStrategyMutator, DispatchStrategyAccessor.DispatchStrategyProperty
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default <EVT extends BusEvent>
java.lang.StringonAction(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.default java.lang.StringonAction(java.lang.Enum<?> aAction, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.default <EVT extends BusEvent>
java.lang.StringonActions(java.lang.Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver, java.lang.Enum<?>... aActions)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.default java.lang.StringonActions(org.refcodes.observer.Observer<BusEvent> aObserver, java.lang.Enum<?>... aActions)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.default <EVT extends BusEvent>
java.lang.StringonAlias(java.lang.Class<EVT> aEventType, java.lang.String aName, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given name.default java.lang.StringonAlias(java.lang.String aName, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given name.default java.lang.StringonCatchAll(org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes all events passing the Event-Bus.default <EVT extends BusEvent>
java.lang.StringonChannel(java.lang.Class<EVT> aEventType, java.lang.String aChannel, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given channel.default java.lang.StringonChannel(java.lang.String aChannel, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given channel.default java.lang.StringonEvent(java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, java.lang.String aChannel, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonEvent(java.lang.Class<EVT> aEventType, java.lang.String aChannel, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default java.lang.StringonEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default java.lang.StringonEvent(java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default java.lang.StringonEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default java.lang.StringonEvent(java.lang.Enum<?> aAction, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default java.lang.StringonEvent(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default java.lang.StringonEvent(java.lang.String aChannel, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.default <EVT extends BusEvent>
java.lang.StringonGroup(java.lang.Class<EVT> aEventType, java.lang.String aGroup, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given group.default java.lang.StringonGroup(java.lang.String aGroup, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given group.default <EVT extends BusEvent>
java.lang.StringonType(java.lang.Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events of the given type.default <EVT extends BusEvent>
java.lang.StringonUniversalId(java.lang.Class<EVT> aEventType, java.lang.String aUid, org.refcodes.observer.Observer<EVT> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given Universal-ID.default java.lang.StringonUniversalId(java.lang.String aUid, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given Universal-ID.default voidpublishEvent(java.lang.Class<?> aPublisherType)Fires an event with the according properties.default voidpublishEvent(java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, org.refcodes.observer.EventMetaData aEventMetaData)Fires an event with the according properties.default voidpublishEvent(java.lang.Enum<?> aAction, org.refcodes.observer.EventMetaData aEventMetaData, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.String aChannel)Fires an event with the according properties.default voidpublishEvent(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType)Fires an event with the according properties.default voidpublishEvent(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(java.lang.String aChannel, DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(DispatchStrategy aStrategy)Fires an event with the according properties.default voidpublishEvent(org.refcodes.observer.EventMetaData aEventMetaData)Fires an event with the according properties.default voidpublishEvent(org.refcodes.observer.EventMetaData aEventMetaData, DispatchStrategy aStrategy)Fires an event with the according properties.default <EVT extends BusEvent>
java.lang.Stringsubscribe(java.lang.Class<EVT> aEventType, BusMatcher aEventMatcher, org.refcodes.observer.Observer<EVT> aObserver)Subscribes a listener to the event bus.default <EVT extends BusEvent>
java.lang.Stringsubscribe(java.lang.Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver)Subscribes a listener to the event bus.-
Methods inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
getDispatchStrategy
-
Methods inherited from interface org.refcodes.eventbus.GenericBusObservable
subscribe, unsubscribeAll
-
Methods inherited from interface org.refcodes.eventbus.GenericEventBus
publishEvent, publishEvent
-
-
-
-
Method Detail
-
onAlias
default java.lang.String onAlias(java.lang.String aName, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given name.- Specified by:
onAliasin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aName- The name for which to subscribe.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onChannel
default java.lang.String onChannel(java.lang.String aChannel, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given channel.- Specified by:
onChannelin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aChannel- The channel to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onGroup
default java.lang.String onGroup(java.lang.String aGroup, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given group.- Specified by:
onGroupin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aGroup- The group to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onUniversalId
default java.lang.String onUniversalId(java.lang.String aUid, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given Universal-ID.- Specified by:
onUniversalIdin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aUid- The Universal-ID to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onAction
default java.lang.String onAction(java.lang.Enum<?> aAction, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.- Specified by:
onActionin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onActions
default java.lang.String onActions(org.refcodes.observer.Observer<BusEvent> aObserver, java.lang.Enum<?>... aActions)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.- Specified by:
onActionsin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aObserver- The observer to be notified.aActions- The actions to which to subscribe to.- Returns:
- A handle to unsubscribe this combination.
-
onCatchAll
default java.lang.String onCatchAll(org.refcodes.observer.Observer<BusEvent> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes all events passing the Event-Bus. Call it a "catch-all" hook.- Specified by:
onCatchAllin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.String aChannel, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aChannel- The channel name on which the event is receivable.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aChannel- The channel name on which the event is receivable.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes.- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default java.lang.String onEvent(java.lang.Enum<?> aAction, org.refcodes.observer.Observer<BusEvent> aObserver)Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.String aChannel, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aChannel- The channel name on which the event is receivable.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aAction- The action which this represents.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, java.lang.String aChannel, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aAction- The action which this represents.aChannel- The channel name on which the event is receivable.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aAction- The action which this represents.aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
default <EVT extends BusEvent> java.lang.String onEvent(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given attributes. YourObservablemay be of the required type!- Specified by:
onEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aAction- The action which this represents.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
subscribe
default <EVT extends BusEvent> java.lang.String subscribe(java.lang.Class<EVT> aEventType, BusMatcher aEventMatcher, org.refcodes.observer.Observer<EVT> aObserver)
Subscribes a listener to the event bus. In case the handle is being ignored, use the "unsubscribeAll" method where all subscriptions for a listener are removed.- Specified by:
subscribein interfaceGenericBusObservable<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The type of event to observe.aEventMatcher- TheEventMatcherto guard theObserver.aObserver- TheObserverto subscribe.- Returns:
- A handle to unsubscribe this combination.
-
subscribe
default <EVT extends BusEvent> java.lang.String subscribe(java.lang.Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver)
Subscribes a listener to the event bus. In case the handle is being ignored, use the "unsubscribeAll" method where all subscriptions for a listener are removed.- Specified by:
subscribein interfaceGenericBusObservable<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The type of event to observe.aObserver- TheObserverto subscribe.- Returns:
- A handle to unsubscribe this combination.
-
onType
default <EVT extends BusEvent> java.lang.String onType(java.lang.Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events of the given type. YourObservablemay be of the required type!- Specified by:
onTypein interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onAlias
default <EVT extends BusEvent> java.lang.String onAlias(java.lang.Class<EVT> aEventType, java.lang.String aName, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events with the given name.- Specified by:
onAliasin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aName- The name for which to subscribe.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onChannel
default <EVT extends BusEvent> java.lang.String onChannel(java.lang.Class<EVT> aEventType, java.lang.String aChannel, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given channel.- Specified by:
onChannelin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aChannel- The channel to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onGroup
default <EVT extends BusEvent> java.lang.String onGroup(java.lang.Class<EVT> aEventType, java.lang.String aGroup, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given group.- Specified by:
onGroupin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aGroup- The group to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onUniversalId
default <EVT extends BusEvent> java.lang.String onUniversalId(java.lang.Class<EVT> aEventType, java.lang.String aUid, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given Universal-ID.- Specified by:
onUniversalIdin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aUid- The Universal-ID to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onAction
default <EVT extends BusEvent> java.lang.String onAction(java.lang.Class<EVT> aEventType, java.lang.Enum<?> aAction, org.refcodes.observer.Observer<EVT> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.- Specified by:
onActionin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aAction- The action to which to subscribe to.aObserver- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onActions
default <EVT extends BusEvent> java.lang.String onActions(java.lang.Class<EVT> aEventType, org.refcodes.observer.Observer<EVT> aObserver, java.lang.Enum<?>... aActions)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)THOUGH subscribes for events for the given action.- Specified by:
onActionsin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Type Parameters:
EVT- The type of the event to subscribe for.- Parameters:
aEventType- The event type to subscribe for.aObserver- The observer to be notified.aActions- The actions to which to subscribe to.- Returns:
- A handle to unsubscribe this combination.
-
publishEvent
default void publishEvent(java.lang.Class<?> aPublisherType)
Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aPublisherType- The type of the event publisher.
-
publishEvent
default void publishEvent(java.lang.String aChannel)
Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aChannel- The channel name on which the event is receivable.
-
publishEvent
default void publishEvent(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aPublisherType- The type of the event publisher.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aChannel- The channel name on which the event is receivable.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.
-
publishEvent
default void publishEvent(org.refcodes.observer.EventMetaData aEventMetaData)
Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aEventMetaData- The Meta-Data to be supplied by the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, org.refcodes.observer.EventMetaData aEventMetaData)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aEventMetaData- The Meta-Data to be supplied by the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction)
Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.
-
publishEvent
default void publishEvent(java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aPublisherType- The type of the event publisher.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.String aChannel, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aChannel- The channel name on which the event is receivable.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aPublisherType- The type of the event publisher.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aChannel- The channel name on which the event is receivable.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, java.lang.String aAlias, java.lang.String aGroup, java.lang.String aChannel, java.lang.String aUid, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aAlias- The alias property.aGroup- The group property.aChannel- The channel property.aUid- The UID (Universal-ID) property.aPublisherType- The type of the event publisher.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(org.refcodes.observer.EventMetaData aEventMetaData, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aEventMetaData- The Meta-Data to be supplied by the event.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, org.refcodes.observer.EventMetaData aEventMetaData, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aEventMetaData- The Meta-Data to be supplied by the event.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(java.lang.Enum<?> aAction, DispatchStrategy aStrategy)Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aAction- The action which this represents.aStrategy- TheDispatchStrategyto use when dispatching the event.
-
publishEvent
default void publishEvent(DispatchStrategy aStrategy)
Fires an event with the according properties.- Specified by:
publishEventin interfaceGenericEventBus<BusEvent,org.refcodes.observer.Observer<BusEvent>,BusMatcher,org.refcodes.observer.EventMetaData,java.lang.String>- Parameters:
aStrategy- TheDispatchStrategyto use when dispatching the event.
-
-