|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.plugin.event.impl.DefaultPluginEventManager
public class DefaultPluginEventManager
Simple, synchronous event manager that uses one or more method selectors to determine event listeners. The default
method selectors are MethodNameListenerMethodSelector and AnnotationListenerMethodSelector.
| Constructor Summary | |
|---|---|
DefaultPluginEventManager()
Default constructor that looks for methods named "channel" and the @PluginEventListener annotations |
|
DefaultPluginEventManager(ListenerMethodSelector[] selectors)
Constructor that looks for an arbitrary selectors |
|
| Method Summary | |
|---|---|
void |
broadcast(java.lang.Object event)
Broadcasts an event to all applicable listeners. |
void |
register(java.lang.Object listener)
Registers a listener by scanning the object for all listener methods |
void |
unregister(java.lang.Object listener)
Unregisters the listener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultPluginEventManager()
public DefaultPluginEventManager(ListenerMethodSelector[] selectors)
selectors - List of selectors that determine which are listener methods| Method Detail |
|---|
public void broadcast(java.lang.Object event)
throws NotificationException
PluginEventManager
broadcast in interface PluginEventManagerevent - The event object. Cannot be null.
NotificationException - If an exception is thrown by one of the Event Listeners.
public void register(java.lang.Object listener)
throws java.lang.IllegalArgumentException
register in interface PluginEventManagerlistener - The listener object
java.lang.IllegalArgumentException - If the listener is null, contains a listener method with 0 or 2 or more
arguments, or contains no listener methodspublic void unregister(java.lang.Object listener)
unregister in interface PluginEventManagerlistener - The listener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||