Package org.glassfish.hk2.api.messaging
Interface TopicDistributionService
- All Known Implementing Classes:
DefaultTopicDistributionService
This service is responsible for distributing messages to Topic subscribers
A 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"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The name of the default TopicDistributionService that is added byServiceLocatorUtilities
-
Method Summary
Modifier and TypeMethodDescriptionvoid
distributeMessage
(Topic<?> topic, Object message) Must distribute the message to all of the matching topic subscribers.
-
Field Details
-
HK2_DEFAULT_TOPIC_DISTRIBUTOR
The name of the default TopicDistributionService that is added byServiceLocatorUtilities
- See Also:
-
-
Method Details
-
distributeMessage
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
-