Class LockFreeAlertPublisher
java.lang.Object
com.atlassian.diagnostics.internal.LockFreeAlertPublisher
- All Implemented Interfaces:
AlertPublisher
-
Constructor Summary
ConstructorsConstructorDescriptionLockFreeAlertPublisher(Collection<AlertListener> coreListeners, Executor executor, PluginHelper pluginHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoidsubscribe(AlertListener listener) Subscribes the providedlistenerto all alertsbooleanunsubscribe(String subscriptionId) Unsubscribes theAlertListenerthat had previouslysubscribed.
-
Constructor Details
-
LockFreeAlertPublisher
public LockFreeAlertPublisher(Collection<AlertListener> coreListeners, Executor executor, PluginHelper pluginHelper)
-
-
Method Details
-
publish
Description copied from interface:AlertPublisher- Specified by:
publishin interfaceAlertPublisher- Parameters:
alert- the alert to publish
-
subscribe
Description copied from interface:AlertPublisherSubscribes the providedlistenerto all alerts- Specified by:
subscribein interfaceAlertPublisher- Parameters:
listener- the listener- Returns:
- the subscription ID to be used in
AlertPublisher.unsubscribe(java.lang.String)
-
unsubscribe
Description copied from interface:AlertPublisherUnsubscribes theAlertListenerthat had previouslysubscribed.- Specified by:
unsubscribein interfaceAlertPublisher- Parameters:
subscriptionId- the subscription ID returned byAlertPublisher.subscribe(com.atlassian.diagnostics.AlertListener)- Returns:
trueif the listener was unsubscribed,falseif no subscription was found forsubscriptionId
-