Package com.atlassian.jira.mock
Class MockListenerManager
java.lang.Object
com.atlassian.jira.mock.MockListenerManager
- All Implemented Interfaces:
ListenerManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(String name, JiraListener listener) createListener(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.
-
Constructor Details
-
MockListenerManager
public MockListenerManager()
-
-
Method Details
-
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.
-
addListener
-
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
-