com.atlassian.greenhopper
Class EventListenerRegistry
java.lang.Object
com.atlassian.greenhopper.EventListenerRegistry
@Service
public class EventListenerRegistry
- extends java.lang.Object
Takes care of Listeners for JIRA events. Event listeners must be handled by the plugin itself, since neither JIRA nor Plugin Framework clear out
registered listeners when the plugin context goes down. If listeners stay behind they'd keep a reference to the GH classloader around from inside
JIRA.
- Author:
- ahennecke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final LoggerWrapper log
EventListenerRegistry
public EventListenerRegistry()
registerListener
public void registerListener(EventListenerRegistry.ListenerKey key,
java.lang.Object listener)
- Register an event listener with JIRA
- Parameters:
key
- : the internal key to keep a reference to the listener underlistener
- : the event listener to register
unregisterAll
public void unregisterAll()
- Unregister all event listeners from JIRA that have been registered here
unregisterListener
public void unregisterListener(EventListenerRegistry.ListenerKey key)
- Unregister an event listener
- Parameters:
key
- : the internal key the listener is stored against
getListener
public java.lang.Object getListener(EventListenerRegistry.ListenerKey key)
- Get a previously registered event listener
- Parameters:
key
- : the internal key the listener is stored against
Copyright © 2007-2014 Atlassian. All Rights Reserved.