Module org.glassfish.hk2.extras
Package org.glassfish.hk2.extras.events
Interface DefaultTopicDistributionErrorService
@Contract
public interface DefaultTopicDistributionErrorService
When using the TopicDistributionService added with
ServiceLocatorUtilities#enableTopicDistribution(org.glassfish.hk2.api.ServiceLocator)
if a subscriber throws an exception this service will be called.
All implementation of this service will be called.- Author:
- jwells
-
Method Summary
Modifier and TypeMethodDescriptionvoidsubscribersFailed(org.glassfish.hk2.api.messaging.Topic<?> topic, Object message, org.glassfish.hk2.api.MultiException error) This method will be called once perTopic.publish(Object)call after the message has been distributed to all subscribers.
-
Method Details
-
subscribersFailed
void subscribersFailed(org.glassfish.hk2.api.messaging.Topic<?> topic, Object message, org.glassfish.hk2.api.MultiException error) This method will be called once perTopic.publish(Object)call after the message has been distributed to all subscribers. TheMultiExceptionwill contain the errors from any subscribers that threw exceptions. This method will not be called if no subscribers threw exceptions- Parameters:
topic- The topic that the message was sent tomessage- The message that was sent to the topicerror- The exceptions thrown by the subscribers of thisTopic
-