com.atlassian.jira.event
Class DefaultListenerManager

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

public class DefaultListenerManager
extends Object
implements ListenerManager, Startable


Field Summary
static String REFRESH_LISTENERS
           
 
Constructor Summary
DefaultListenerManager(com.atlassian.event.api.EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService)
           
 
Method Summary
 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<String,JiraListener> getListeners()
          Returns a map of listeners.
 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 wil be called after the plugin system is fully initialised and all components added to the dependency injection framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REFRESH_LISTENERS

public static final String REFRESH_LISTENERS
See Also:
Constant Field Values
Constructor Detail

DefaultListenerManager

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

start

public void start()
           throws Exception
Description copied from interface: Startable
This method wil 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


Copyright © 2002-2014 Atlassian. All Rights Reserved.