Package com.atlassian.jira.event
Class DefaultListenerManager
java.lang.Object
com.atlassian.jira.event.DefaultListenerManager
- All Implemented Interfaces:
ListenerManager,Startable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultListenerManager(com.atlassian.event.api.EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService) -
Method Summary
Modifier and TypeMethodDescriptioncreateListener(String name, Class<? extends JiraListener> clazz) Creates a new JiraListener.voiddeleteListener(Class<? extends JiraListener> clazz) Deletes any listeners of the given class.Returns a map of listeners.voidonClearCache(ClearCacheEvent event) voidInvoked when another node in the cluster has refreshed its listeners.voidrefresh()Reloads the map of listeners from the db.voidstart()This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
-
Field Details
-
REFRESH_LISTENERS
- See Also:
-
-
Constructor Details
-
DefaultListenerManager
public DefaultListenerManager(com.atlassian.event.api.EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService)
-
-
Method Details
-
start
Description copied from interface:StartableThis method will be called after the plugin system is fully initialised and all components added to the dependency injection framework. -
onClearCache
-
getListeners
Description copied from interface:ListenerManagerReturns a map of listeners. The map contains mappings from the listener name to listener class.- Specified by:
getListenersin interfaceListenerManager- Returns:
- A map with name -> class mappings.
-
createListener
Description copied from interface:ListenerManagerCreates a new JiraListener.- Specified by:
createListenerin interfaceListenerManager- Parameters:
name- The name of the Listenerclazz- The class of the Listener.- Returns:
- the newly created JiraListener
-
deleteListener
Description copied from interface:ListenerManagerDeletes any listeners of the given class.- Specified by:
deleteListenerin interfaceListenerManager- Parameters:
clazz- The class of the Listener.
-
refresh
public void refresh()Description copied from interface:ListenerManagerReloads the map of listeners from the db.- Specified by:
refreshin interfaceListenerManager
-
onRefreshListeners
public void onRefreshListeners()Description copied from interface:ListenerManagerInvoked when another node in the cluster has refreshed its listeners.- Specified by:
onRefreshListenersin interfaceListenerManager
-