summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/geb/api/IBus.java
blob: 6a5624385c589954140fe63dab6cf7d05f0df445 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package ftbsc.geb.api;

/**
 * A generic interface for a bus that can work with this
 * event system.
 * @since 0.1.0
 */
public interface IBus {
   /**
    * Registers a new listener on the bus.
    * @param listener the listener
    */
   void registerListener(IListener listener);

   /**
    * Dispatches an event, calling all of its listeners that are subscribed to this bus.
    * @param event the event to fire
    * @return true if the event was canceled, false otherwise
    */
   boolean handleEvent(IEvent event);
}