java.lang.Object
it.tidalwave.messagebus.spi.SimpleAsyncMessageDelivery
- All Implemented Interfaces:
MessageDelivery
An implementation of
MessageDelivery that dispatches messages as soon as they are published, each one in a separate task of the
Executor of the SimpleMessageBus.- Since:
- 2.2
- Author:
- Fabrizio Giudici
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voiddeliverMessage(Class<T> topic, T message) Delivers a message to the listeners.voidinitialize(SimpleMessageBus messageBusSupport) Initializes this object.
-
Constructor Details
-
SimpleAsyncMessageDelivery
public SimpleAsyncMessageDelivery()
-
-
Method Details
-
initialize
Initializes this object. It is called by the constructor ofSimpleMessageBus.- Specified by:
initializein interfaceMessageDelivery- Parameters:
messageBusSupport- the message bus
-
deliverMessage
Delivers a message to the listeners.- Specified by:
deliverMessagein interfaceMessageDelivery- Type Parameters:
T- the static type of the topic- Parameters:
topic- the dynamic type of the topicmessage- the message
-