Top Description Fields Methods
org.glassfish.hk2.api.messaging

public Interface TopicDistributionService

Annotations
@Contract
Imports
org.jvnet.hk2.annotations.Contract

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 org.glassfish.hk2.utilities.ServiceLocatorUtilities#enableTopicDistribution(org.glassfish.hk2.api.ServiceLocator) method. The default implementation will be named "HK2TopicDistributionService"

Author
jwells

Field Summary

Modifier and TypeField and Description
public static final String
HK2_DEFAULT_TOPIC_DISTRIBUTOR

The name of the default TopicDistributionService that is added by org.glassfish.hk2.utilities.ServiceLocatorUtilities

Method Summary

Modifier and TypeMethod and Description
public void
distributeMessage(Topic<?>
The topic to which to distribute the message. Must not be null
topic
,
Object
The message to send to the topic. Must not be null
message
)

Must distribute the message to all of the matching topic subscribers.

Field Detail

HK2_DEFAULT_TOPIC_DISTRIBUTORback to summary
public static final String HK2_DEFAULT_TOPIC_DISTRIBUTOR

The name of the default TopicDistributionService that is added by org.glassfish.hk2.utilities.ServiceLocatorUtilities

Method Detail

distributeMessageback to summary
public 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:Topic<?>

The topic to which to distribute the message. Must not be null

message:Object

The message to send to the topic. Must not be null