S - The concrete type of the state object.public interface EventBus<S extends State> extends Disposable, EventLoggerAware<S>
| Modifier and Type | Method and Description |
|---|---|
void |
handleEvent(Event event)
Execute the event handler that is mapped to this event type.
|
<E extends Event> |
mapEventHandler(Class<E> eventClass,
EventHandler<S,E> eventHandler)
Map a event handler for a concrete event type.
|
addEventLogger, removeEventLoggerdisposevoid handleEvent(Event event)
event - The event to handle.mapEventHandler(Class, EventHandler)<E extends Event> void mapEventHandler(Class<E> eventClass, EventHandler<S,E> eventHandler)
E - The concrete event type that this handler will produce.eventClass - The concrete event type that this handler will handle.eventHandler - The handler that is executed when handleEvent(Event) is
called.Copyright © 2016 Cooking Fox. All rights reserved.