Package com.atlassian.jira.event
Interface ListenerManager
- All Known Implementing Classes:
DefaultListenerManager,MockListenerManager,SubvertedListenerManager
@PublicApi
public interface ListenerManager
Responsible for maintaining a event listeners. These are generally configured in the database,
and implementing Listener classes must implement the
JiraListener interface.-
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.voidInvoked when another node in the cluster has refreshed its listeners.voidrefresh()Reloads the map of listeners from the db.
-
Method Details
-
getListeners
Map<String,JiraListener> getListeners()Returns a map of listeners. The map contains mappings from the listener name to listener class.- Returns:
- A map with name -> class mappings.
-
createListener
Creates a new JiraListener.- Parameters:
name- The name of the Listenerclazz- The class of the Listener.- Returns:
- the newly created JiraListener
-
deleteListener
Deletes any listeners of the given class.- Parameters:
clazz- The class of the Listener.
-
refresh
void refresh()Reloads the map of listeners from the db. -
onRefreshListeners
void onRefreshListeners()Invoked when another node in the cluster has refreshed its listeners.
-