@Singleton @Named(value="HK2TopicDistributionService") @ContractsProvided(value={TopicDistributionService.class,InstanceLifecycleListener.class,DynamicConfigurationListener.class}) public class DefaultTopicDistributionService extends Object implements TopicDistributionService, InstanceLifecycleListener, DynamicConfigurationListener
HK2_DEFAULT_TOPIC_DISTRIBUTOR| Constructor and Description |
|---|
DefaultTopicDistributionService() |
| Modifier and Type | Method and Description |
|---|---|
void |
configurationChanged()
This method is called when the set of descriptors
in this service locator has been changed.
|
void |
distributeMessage(Topic<?> topic,
Object message)
Must distribute the message to all of the matching topic subscribers.
|
Filter |
getFilter()
This returns a filter that tells the system whether a particular descriptor should be handled by this lifecycle
listener.
|
void |
lifecycleEvent(InstanceLifecycleEvent lifecycleEvent)
This method will be called when any lifecycle event occurs.
|
public void distributeMessage(Topic<?> topic, Object message)
TopicDistributionServicedistributeMessage in interface TopicDistributionServicetopic - The topic to which to distribute the message. Must not be nullmessage - The message to send to the topic. Must not be nullpublic Filter getFilter()
InstanceLifecycleListenergetFilter in interface InstanceLifecycleListenerpublic void lifecycleEvent(InstanceLifecycleEvent lifecycleEvent)
InstanceLifecycleListenerlifecycleEvent in interface InstanceLifecycleListenerlifecycleEvent - The event that has occurred, will not be nullpublic void configurationChanged()
DynamicConfigurationListenerDynamicConfiguration.commit() so care should be taken
to do any work quickly. Any exception thrown from this method
will be ignored. A commit that failed will not be reported to
this methodconfigurationChanged in interface DynamicConfigurationListenerCopyright © 2009–2014 Oracle Corporation. All rights reserved.