public class DefaultListenerManager extends Object implements ListenerManager, Startable
Modifier and Type | Field and Description |
---|---|
static String |
REFRESH_LISTENERS |
Constructor and Description |
---|
DefaultListenerManager(com.atlassian.event.api.EventPublisher eventPublisher,
OfBizDelegator ofBizDelegator,
ClusterMessagingService messagingService) |
Modifier and Type | Method and Description |
---|---|
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 will be called after the plugin system is fully initialised and all components added to the
dependency injection framework.
|
public static final String REFRESH_LISTENERS
public DefaultListenerManager(com.atlassian.event.api.EventPublisher eventPublisher, OfBizDelegator ofBizDelegator, ClusterMessagingService messagingService)
public void start() throws Exception
Startable
@EventListener public void onClearCache(ClearCacheEvent event)
public Map<String,JiraListener> getListeners()
ListenerManager
getListeners
in interface ListenerManager
public JiraListener createListener(String name, Class<? extends JiraListener> clazz)
ListenerManager
createListener
in interface ListenerManager
name
- The name of the Listenerclazz
- The class of the Listener.public void deleteListener(Class<? extends JiraListener> clazz)
ListenerManager
deleteListener
in interface ListenerManager
clazz
- The class of the Listener.public void refresh()
ListenerManager
refresh
in interface ListenerManager
public void onRefreshListeners()
ListenerManager
onRefreshListeners
in interface ListenerManager
Copyright © 2002-2023 Atlassian. All Rights Reserved.