1 package com.atlassian.plugin.event;
2
3 /**
4 * Defines the event manager for use with internal Atlassian Plugins framework events. How listeners are defined is up
5 * to the implementation. Implementations should allow listeners to somehow identify which events they would like to
6 * listen for, then have the appropriate methods called if the event is the desired class or a subclass/implementation.
7 * This means a listener could listen for an event of type java.lang.Object and should be notified for every event.
8 *
9 */
10 public interface PluginEventManager
11 {
12 /**
13 * Registers a listener object
14 *
15 * @param listener The listener instance. Cannot be null.
16 */
17 void register(Object listener);
18
19 /**
20 * Unregisters a listener object
21 *
22 * @param listener The listener. Cannot be null.
23 */
24 void unregister(Object listener);
25
26 /**
27 * Broadcasts an event to all applicable listeners
28 * @param event The event object. Cannot be null.
29 */
30 void broadcast(Object event);
31 }