blob: ef13f0bf36344b1d861b8b3078c09411ad7823a1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package ftbsc.geb.api;
import java.util.Map;
import java.util.Set;
/**
* The interface that the generated dispatchers will all use.
* This interface isn't really meant to be used by humans, but it should work if your
* use case requires it.
* @since 0.1.1
*/
public interface IEventDispatcher {
/**
* Calls all listeners for the given event.
* @param event the event to call
* @param listeners a map mapping each {@link IListener} class to its instances
* @return the value {@link IBus#handleEvent(IEvent)} will return for this
*/
boolean callListeners(IEvent event, Map<Class<? extends IListener>, Set<IListener>> listeners);
/**
* @return the {@link Class} representing the event this dispatcher works with
*/
Class<? extends IEvent> eventType();
}
|