Package org.glassfish.hk2.api.messaging
Interface TopicDistributionService
-
- All Known Implementing Classes:
DefaultTopicDistributionService
@Contract public interface TopicDistributionService
This service is responsible for distributing messages to Topic subscribersA default implementation of this service is provided by HK2 and can be added to the system with the
ServiceLocatorUtilities.enableTopicDistribution(org.glassfish.hk2.api.ServiceLocator)
method. The default implementation will be named "HK2TopicDistributionService"- Author:
- jwells
-
-
Field Summary
Fields Modifier and Type Field Description static String
HK2_DEFAULT_TOPIC_DISTRIBUTOR
The name of the default TopicDistributionService that is added byServiceLocatorUtilities
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
distributeMessage(Topic<?> topic, Object message)
Must distribute the message to all of the matching topic subscribers.
-
-
-
Field Detail
-
HK2_DEFAULT_TOPIC_DISTRIBUTOR
static final String HK2_DEFAULT_TOPIC_DISTRIBUTOR
The name of the default TopicDistributionService that is added byServiceLocatorUtilities
- See Also:
- Constant Field Values
-
-
Method Detail
-
distributeMessage
void distributeMessage(Topic<?> topic, Object message)
Must distribute the message to all of the matching topic subscribers. Any exception thrown from this method will be ignored. Instead error handling should be performed by the implementation of this message- Parameters:
topic
- The topic to which to distribute the message. Must not be nullmessage
- The message to send to the topic. Must not be null
-
-