Class AbstractSyncAsyncMessageBus<T,​P extends ISyncAsyncPublicationCommand>

    • Field Detail

      • executor

        private final java.util.concurrent.ExecutorService executor
      • dispatchers

        private final java.util.List<java.lang.Thread> dispatchers
      • pendingMessages

        private final java.util.concurrent.BlockingQueue<IMessagePublication> pendingMessages
    • Constructor Detail

      • AbstractSyncAsyncMessageBus

        protected AbstractSyncAsyncMessageBus​(IBusConfiguration configuration)
    • Method Detail

      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • shutdown

        public void shutdown()
        Description copied from interface: IMessageBus
        Shutdown the bus such that it will stop delivering asynchronous messages. Executor service and other internally used threads will be shutdown gracefully. After calling shutdown it is not safe to further use the message bus.
        Specified by:
        shutdown in interface IMessageBus<T,​P extends ISyncAsyncPublicationCommand>
      • hasPendingMessages

        public boolean hasPendingMessages()
        Description copied from interface: IMessageBus
        Check whether any asynchronous message publications are pending to be processed
        Specified by:
        hasPendingMessages in interface IMessageBus<T,​P extends ISyncAsyncPublicationCommand>
        Returns:
        true if any unfinished message publications are found