Package org.refcodes.eventbus
Interface GenericEventBus<E extends org.refcodes.observer.GenericEvent<?>,O extends org.refcodes.observer.Observer<E>,MATCH extends org.refcodes.observer.EventMatcher<E>,META extends org.refcodes.observer.EventMetaData,H>
-
- Type Parameters:
E
- the element typeO
- the generic typeMATCH
- the generic typeMETA
- the generic typeH
- the generic type
- All Superinterfaces:
DispatchStrategyAccessor
,org.refcodes.observer.EventMatcher<E>
,GenericBusObservable<E,O,MATCH,H>
,GenericBusPublisher<E>
,org.refcodes.component.HandleLookup<E,O>
,org.refcodes.matcher.Matcher<E>
,org.refcodes.observer.Publisher<E>
- All Known Subinterfaces:
EventBus
- All Known Implementing Classes:
AbstractEventBus
,EventBusImpl
public interface GenericEventBus<E extends org.refcodes.observer.GenericEvent<?>,O extends org.refcodes.observer.Observer<E>,MATCH extends org.refcodes.observer.EventMatcher<E>,META extends org.refcodes.observer.EventMetaData,H> extends GenericBusPublisher<E>, GenericBusObservable<E,O,MATCH,H>, DispatchStrategyAccessor
TheGenericEventBus
is the (virtual) machine wide manager forGenericActionEvent
handling.TIPP: In order to distinguish
ActionMetaDataEventImpl
instances from each other, create an actions enumeration, enumerating the various event actions you support. Pass the actual action you intend to notify upon to the according constructor, as anObserver
you may use the declarative methodEventMatcherSugar.actionEqualWith(Object)
to test whether your action was notified (or a simple switch case statement).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
DispatchStrategyAccessor.DispatchStrategyMutator, DispatchStrategyAccessor.DispatchStrategyProperty
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <EVT extends E>
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.java.lang.String
onAction(java.lang.Enum<?> aAction, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given action.<EVT extends E>
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.java.lang.String
onActions(O aObserver, java.lang.Enum<?>... aActions)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given action.<EVT extends E>
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.java.lang.String
onAlias(java.lang.String aAlias, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given name.java.lang.String
onCatchAll(O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes all events passing the Event-Bus.<EVT extends E>
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.java.lang.String
onChannel(java.lang.String aChannel, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given channel.java.lang.String
onEvent(java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.<EVT extends E>
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.<EVT extends E>
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.<EVT extends E>
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.<EVT extends E>
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.<EVT extends E>
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.<EVT extends E>
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.<EVT extends E>
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.java.lang.String
onEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.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<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.java.lang.String
onEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.java.lang.String
onEvent(java.lang.Enum<?> aAction, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.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<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.java.lang.String
onEvent(java.lang.String aChannel, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.<EVT extends E>
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.java.lang.String
onGroup(java.lang.String aGroup, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given group.<EVT extends E>
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.<EVT extends E>
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.java.lang.String
onUniversalId(java.lang.String aUid, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given Universal-ID.default void
publishEvent(E aEvent)
Publishes an event using theDispatchStrategy
as returned byDispatchStrategyAccessor.getDispatchStrategy()
.void
publishEvent(E aEvent, DispatchStrategy aDispatchStrategy)
Publishes an event using the givenDispatchStrategy
.void
publishEvent(java.lang.Class<?> aPublisherType)
Fires an event with the according properties.void
publishEvent(java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel)
Fires an event with the according properties.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.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.void
publishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction, META aEventMetaData)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction, META aEventMetaData, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(java.lang.Enum<?> aAction, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(java.lang.String aChannel)
Fires an event with the according properties.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.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.void
publishEvent(java.lang.String aChannel, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(META aEventMetaData)
Fires an event with the according properties.void
publishEvent(META aEventMetaData, DispatchStrategy aStrategy)
Fires an event with the according properties.void
publishEvent(DispatchStrategy aStrategy)
Fires an event with the according properties.-
Methods inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor
getDispatchStrategy
-
Methods inherited from interface org.refcodes.eventbus.GenericBusObservable
subscribe, subscribe, subscribe, unsubscribeAll
-
-
-
-
Method Detail
-
publishEvent
default void publishEvent(E aEvent)
Publishes an event using theDispatchStrategy
as returned byDispatchStrategyAccessor.getDispatchStrategy()
.- Specified by:
publishEvent
in interfaceorg.refcodes.observer.Publisher<E extends org.refcodes.observer.GenericEvent<?>>
-
publishEvent
void publishEvent(E aEvent, DispatchStrategy aDispatchStrategy)
Publishes an event using the givenDispatchStrategy
.- Parameters:
aEvent
- aEvent The event to be published.aDispatchStrategy
- TheDispatchStrategy
to be used when publishing the event.
-
onEvent
java.lang.String onEvent(java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.- Parameters:
aPublisherType
- The type of the event publisher.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
java.lang.String onEvent(java.lang.String aChannel, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.- 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
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<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.- 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
java.lang.String onEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.- 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
java.lang.String onEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.- 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
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<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes.- 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
java.lang.String onEvent(java.lang.Enum<?> aAction, org.refcodes.observer.Observer<E> aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given attributes. YourObservable
may be of the required type!- Parameters:
aAction
- The action which this represents.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onAlias
java.lang.String onAlias(java.lang.String aAlias, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events with the given name.- Parameters:
aAlias
- The name for which to subscribe.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onChannel
java.lang.String onChannel(java.lang.String aChannel, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given channel.- Parameters:
aChannel
- The channel to which to subscribe to.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onGroup
java.lang.String onGroup(java.lang.String aGroup, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given group.- Parameters:
aGroup
- The group to which to subscribe to.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onUniversalId
java.lang.String onUniversalId(java.lang.String aUid, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given Universal-ID.- Parameters:
aUid
- The Universal-ID to which to subscribe to.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onAction
java.lang.String onAction(java.lang.Enum<?> aAction, O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given action.- Parameters:
aAction
- The action to which to subscribe to.aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onActions
java.lang.String onActions(O aObserver, java.lang.Enum<?>... aActions)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes for events for the given action.- Parameters:
aObserver
- The observer to be notified.aActions
- The actions to which to subscribe to.- Returns:
- A handle to unsubscribe this combination.
-
onCatchAll
java.lang.String onCatchAll(O aObserver)
Similar to the more generic methodGenericBusObservable.subscribe(EventMatcher, Observer)
THOUGH subscribes all events passing the Event-Bus. Call it a "catch-all" hook.- Parameters:
aObserver
- The observer to be notified.- Returns:
- A handle to unsubscribe this combination.
-
onEvent
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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. YourObservable
may be of the required type!- 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.
-
onType
<EVT extends E> 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. YourObservable
may be of the required type!- 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
<EVT extends E> 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.- 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
<EVT extends E> 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.- 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
<EVT extends E> 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.- 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
<EVT extends E> 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.- 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
<EVT extends E> 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.- 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
<EVT extends E> 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.- 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
void publishEvent(java.lang.Class<?> aPublisherType)
Fires an event with the according properties.- Parameters:
aPublisherType
- The type of the event publisher.
-
publishEvent
void publishEvent(java.lang.String aChannel)
Fires an event with the according properties.- Parameters:
aChannel
- The channel name on which the event is receivable.
-
publishEvent
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.- 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
void publishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aPublisherType
- The type of the event publisher.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aChannel
- The channel name on which the event is receivable.
-
publishEvent
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.- 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
void publishEvent(META aEventMetaData)
Fires an event with the according properties.- Parameters:
aEventMetaData
- The Meta-Data to be supplied by the event.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction, META aEventMetaData)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aEventMetaData
- The Meta-Data to be supplied by the event.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.
-
publishEvent
void publishEvent(java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aPublisherType
- The type of the event publisher.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(java.lang.String aChannel, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aChannel
- The channel name on which the event is receivable.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
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.- 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
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction, java.lang.Class<?> aPublisherType, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aPublisherType
- The type of the event publisher.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction, java.lang.String aChannel, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aChannel
- The channel name on which the event is receivable.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
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.- 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
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(META aEventMetaData, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aEventMetaData
- The Meta-Data to be supplied by the event.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction, META aEventMetaData, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aEventMetaData
- The Meta-Data to be supplied by the event.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(java.lang.Enum<?> aAction, DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aAction
- The action which this represents.aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
publishEvent
void publishEvent(DispatchStrategy aStrategy)
Fires an event with the according properties.- Parameters:
aStrategy
- TheDispatchStrategy
to use when dispatching the event.
-
-