Class DefaultListenerManager

java.lang.Object
com.atlassian.jira.event.DefaultListenerManager
All Implemented Interfaces:
ListenerManager, Startable

public class DefaultListenerManager extends Object implements ListenerManager, Startable
  • Field Details

  • Constructor Details

    • DefaultListenerManager

      public DefaultListenerManager(com.atlassian.event.api.EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService)
  • Method Details

    • start

      public void start() throws Exception
      Description copied from interface: Startable
      This method will be called after the plugin system is fully initialised and all components added to the dependency injection framework.
      Specified by:
      start in interface Startable
      Throws:
      Exception - Allows implementations to throw an Exception.
    • onClearCache

      @EventListener public void onClearCache(ClearCacheEvent event)
    • getListeners

      public Map<String,JiraListener> getListeners()
      Description copied from interface: ListenerManager
      Returns a map of listeners. The map contains mappings from the listener name to listener class.
      Specified by:
      getListeners in interface ListenerManager
      Returns:
      A map with name -> class mappings.
    • createListener

      public JiraListener createListener(String name, Class<? extends JiraListener> clazz)
      Description copied from interface: ListenerManager
      Creates a new JiraListener.
      Specified by:
      createListener in interface ListenerManager
      Parameters:
      name - The name of the Listener
      clazz - The class of the Listener.
      Returns:
      the newly created JiraListener
    • deleteListener

      public void deleteListener(Class<? extends JiraListener> clazz)
      Description copied from interface: ListenerManager
      Deletes any listeners of the given class.
      Specified by:
      deleteListener in interface ListenerManager
      Parameters:
      clazz - The class of the Listener.
    • refresh

      public void refresh()
      Description copied from interface: ListenerManager
      Reloads the map of listeners from the db.
      Specified by:
      refresh in interface ListenerManager
    • onRefreshListeners

      public void onRefreshListeners()
      Description copied from interface: ListenerManager
      Invoked when another node in the cluster has refreshed its listeners.
      Specified by:
      onRefreshListeners in interface ListenerManager