public class

DefaultListenerManager

extends Object
implements ListenerManager Startable
java.lang.Object
   ↳ com.atlassian.jira.event.DefaultListenerManager

Summary

Constants
String REFRESH_LISTENERS
Public Constructors
DefaultListenerManager(EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService)
Public Methods
JiraListener createListener(String name, Class<? extends JiraListener> clazz)
Creates a new JiraListener.
void deleteListener(Class<? extends JiraListener> clazz)
Deletes any listeners of the given class.
Map<StringJiraListener> getListeners()
Returns a map of listeners.
@EventListener void onClearCache(ClearCacheEvent event)
void onRefreshListeners()
Invoked when another node in the cluster has refreshed its listeners.
void refresh()
Reloads the map of listeners from the db.
void start()
This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.event.ListenerManager
From interface com.atlassian.jira.extension.Startable

Constants

public static final String REFRESH_LISTENERS

Constant Value: "Refresh Listeners"

Public Constructors

public DefaultListenerManager (EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService)

Public Methods

public JiraListener createListener (String name, Class<? extends JiraListener> clazz)

Creates a new JiraListener.

Parameters
name The name of the Listener
clazz The class of the Listener.
Returns
  • the newly created JiraListener

public void deleteListener (Class<? extends JiraListener> clazz)

Deletes any listeners of the given class.

Parameters
clazz The class of the Listener.

public Map<StringJiraListener> getListeners ()

Returns a map of listeners. The map contains mappings from the listener name to listener class.

Returns
  • A map with name -> class mappings.

@EventListener public void onClearCache (ClearCacheEvent event)

public void onRefreshListeners ()

Invoked when another node in the cluster has refreshed its listeners.

public void refresh ()

Reloads the map of listeners from the db.

public void start ()

This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.

Throws
Exception