Class SyncMessageBus<T>

    • Constructor Detail

      • SyncMessageBus

        public SyncMessageBus()
        Default constructor using default setup. super() will also add a default publication error logger
      • SyncMessageBus

        public SyncMessageBus​(IPublicationErrorHandler errorHandler)
        Construct with default settings and specified publication error handler
        Parameters:
        errorHandler -
      • SyncMessageBus

        public SyncMessageBus​(IBusConfiguration configuration)
        Construct with fully specified configuration
        Parameters:
        configuration -
    • Method Detail

      • publish

        public IMessagePublication publish​(T message)
        Description copied from interface: PubSubSupport
        Synchronously publish a message to all registered listeners. This includes listeners defined for super types of the given message type, provided they are not configured to reject valid subtype. The call returns when all matching handlers of all registered listeners have been notified (invoked) of the message.
        Specified by:
        publish in interface PubSubSupport<T>
      • post

        public SyncMessageBus.SyncPostCommand post​(T message)
        Description copied from interface: GenericMessagePublicationSupport
        Publish a message to the bus using on of its supported message publication mechanisms. The supported mechanisms depend on the available implementation and are exposed as subclasses of IPublicationCommand. The standard mechanism is the synchronous dispatch which will publish the message in the current thread and returns after every matching handler has been invoked.
        Specified by:
        post in interface GenericMessagePublicationSupport<T,​SyncMessageBus.SyncPostCommand>
        Parameters:
        message - - Any subtype of T welcome
        Returns:
        An object that provides access to the available publication methods supported by the message bus.