All Superinterfaces:
org.refcodes.component.Destroyable, org.refcodes.eventbus.DispatchStrategyAccessor, org.refcodes.eventbus.EventBusObservable<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,String>, org.refcodes.eventbus.EventBusPublisher<ApplicationBusEvent>, org.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,org.refcodes.mixin.EventMetaData,String>, org.refcodes.component.HandleLookup<String,org.refcodes.observer.Observer<ApplicationBusEvent>>, org.refcodes.matcher.Matchable<ApplicationBusEvent>, org.refcodes.observer.Publisher<ApplicationBusEvent>
All Known Subinterfaces:
ApplicationBus, MessagePropertiesBus
All Known Implementing Classes:
ApplicationBusImpl

public interface MessageBus extends org.refcodes.eventbus.GenericEventBus<ApplicationBusEvent,org.refcodes.observer.Observer<ApplicationBusEvent>,ApplicationEventMatcher,org.refcodes.mixin.EventMetaData,String>
The MessageBus extends the ApplicationBus with convenience functionality common to everyday application and service development regarding dispatching of message String instances.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.refcodes.component.Destroyable

    org.refcodes.component.Destroyable.DestroyAutomaton

    Nested classes/interfaces inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor

    org.refcodes.eventbus.DispatchStrategyAccessor.DispatchStrategyMutator, org.refcodes.eventbus.DispatchStrategyAccessor.DispatchStrategyProperty
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    onMessage(Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(Enum<?> aAction, Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(Enum<?> aAction, String aChannel, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(Enum<?> aAction, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(String aChannel, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
    default String
    onMessage(org.refcodes.observer.Observer<MessageBusEvent> aObserver)
    Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances.
    default void
    publishMessage(Enum<?> aAction, String aMessage)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, Class<?> aPublisherType)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, String aChannel)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType)
    Publishes an event with the provided message for the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(Enum<?> aAction, String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, Class<?> aPublisherType)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, String aChannel)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData)
    Publishes an event with the provided message and the given attributes.
    default void
    publishMessage(String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy)
    Publishes an event with the provided message and the given attributes.

    Methods inherited from interface org.refcodes.component.Destroyable

    destroy

    Methods inherited from interface org.refcodes.eventbus.DispatchStrategyAccessor

    getDispatchStrategy

    Methods inherited from interface org.refcodes.eventbus.EventBusObservable

    subscribe, subscribe, subscribe, unsubscribeAll

    Methods inherited from interface org.refcodes.eventbus.GenericEventBus

    onAction, onAction, onActions, onActions, onAlias, onAlias, onCatchAll, onChannel, onChannel, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onEvent, onGroup, onGroup, onType, onUniversalId, onUniversalId, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent, publishEvent

    Methods inherited from interface org.refcodes.component.HandleLookup

    hasHandle, lookupHandle, removeHandle

    Methods inherited from interface org.refcodes.matcher.Matchable

    isMatching
  • Method Details

    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, Class<?> aPublisherType)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which this represents.
      aMessage - The message to be carried by the event.
      aPublisherType - The type of the event publisher.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, String aChannel)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which this represents.
      aMessage - The message to be carried by the event.
      aChannel - The channel name on which the event is receivable.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType)
      Publishes an event with the provided message for the given attributes.
      Parameters:
      aAction - The action which this represents.
      aMessage - The message to be carried by the event.
      aAlias - The alias property.
      aGroup - The group property.
      aChannel - The channel property.
      aUid - The UID (Universal-TID) property.
      aPublisherType - The type of the event publisher.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which the event represents.
      aMessage - The message to be carried by the event.
      aEventMetaData - The Meta-Data to by supplied by the event.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which the event represents.
      aMessage - The message to be carried by the event.
    • publishMessage

      default void publishMessage(String aMessage, Class<?> aPublisherType)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aPublisherType - The type of the event publisher.
    • publishMessage

      default void publishMessage(String aMessage, String aChannel)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aChannel - The channel name on which the event is receivable.
    • publishMessage

      default void publishMessage(String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aAlias - The alias property.
      aGroup - The group property.
      aChannel - The channel property.
      aUid - The UID (Universal-TID) property.
      aPublisherType - The type of the event publisher.
    • publishMessage

      default void publishMessage(String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aEventMetaData - The Meta-Data to by supplied by the event.
    • publishMessage

      default void publishMessage(String aMessage)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which this represents.
      aMessage - The message to be carried by the event.
      aPublisherType - The type of the event publisher.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which this represents.
      aMessage - The message to be carried by the event.
      aChannel - The channel name on which the event is receivable.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which this represents.
      aMessage - The message to be carried by the event.
      aAlias - The alias property.
      aGroup - The group property.
      aChannel - The channel property.
      aUid - The UID (Universal-TID) property.
      aPublisherType - The type of the event publisher.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which the event represents.
      aMessage - The message to be carried by the event.
      aEventMetaData - The Meta-Data to by supplied by the event.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(Enum<?> aAction, String aMessage, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aAction - The action which the event represents.
      aMessage - The message to be carried by the event.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(String aMessage, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aPublisherType - The type of the event publisher.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(String aMessage, String aChannel, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aChannel - The channel name on which the event is receivable.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(String aMessage, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aAlias - The alias property.
      aGroup - The group property.
      aChannel - The channel property.
      aUid - The UID (Universal-TID) property.
      aPublisherType - The type of the event publisher.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(String aMessage, org.refcodes.mixin.EventMetaData aEventMetaData, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aEventMetaData - The Meta-Data to by supplied by the event.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • publishMessage

      default void publishMessage(String aMessage, org.refcodes.eventbus.DispatchStrategy aStrategy)
      Publishes an event with the provided message and the given attributes.
      Parameters:
      aMessage - The message to be carried by the event.
      aStrategy - The DispatchStrategy to use when dispatching the event.
    • onMessage

      default String onMessage(org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances.
      Parameters:
      aObserver - The observer to be notified.
      Returns:
      A handle to unsubscribe this combination.
    • onMessage

      default String onMessage(Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances 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.
    • onMessage

      default String onMessage(String aChannel, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances 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.
    • onMessage

      default String onMessage(String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
      Parameters:
      aAlias - The alias property.
      aGroup - The group property.
      aChannel - The channel property.
      aUid - The UID (Universal-TID) property.
      aPublisherType - The type of the event publisher.
      aObserver - The observer to be notified.
      Returns:
      A handle to unsubscribe this combination.
    • onMessage

      default String onMessage(Enum<?> aAction, Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
      Parameters:
      aAction - The action property.
      aPublisherType - The type of the event publisher.
      aObserver - The observer to be notified.
      Returns:
      A handle to unsubscribe this combination.
    • onMessage

      default String onMessage(Enum<?> aAction, String aChannel, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
      Parameters:
      aAction - The action property.
      aChannel - The channel name on which the event is receivable.
      aObserver - The observer to be notified.
      Returns:
      A handle to unsubscribe this combination.
    • onMessage

      default String onMessage(Enum<?> aAction, String aAlias, String aGroup, String aChannel, String aUid, Class<?> aPublisherType, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes.
      Parameters:
      aAction - The action property.
      aAlias - The alias property.
      aGroup - The group property.
      aChannel - The channel property.
      aUid - The UID (Universal-TID) property.
      aPublisherType - The type of the event publisher.
      aObserver - The observer to be notified.
      Returns:
      A handle to unsubscribe this combination.
    • onMessage

      default String onMessage(Enum<?> aAction, org.refcodes.observer.Observer<MessageBusEvent> aObserver)
      Similar to the more generic method EventBusObservable.subscribe(EventMatcher, Observer) THOUGH subscribes for MessageBusEvent instances with the given attributes. Your Observable may be of the required type!
      Parameters:
      aAction - The action property.
      aObserver - The observer to be notified.
      Returns:
      A handle to unsubscribe this combination.