1 package com.atlassian.event.spi;
2
3 /**
4 * Dispatches an event to its listener (through the invoker). Implementations can choose for example whether to dispatch
5 * events asynchronously.
6 *
7 * @since 2.0
8 */
9 public interface EventDispatcher {
10 /**
11 * Dispatches the event using the invoker.
12 *
13 * @param invoker the invoker to use to dispatch the event
14 * @param event the event to dispatch
15 * @throws NullPointerException if either the {@code invoker} or the {@code event} is {@code null}
16 */
17 void dispatch(ListenerInvoker invoker, Object event);
18 }