public interface EventBus
Modifier and Type | Method and Description |
---|---|
void |
dispatch(ScoreEvent... eventWrappers)
dispatch the given events, meaning relevant handlers will be called based on the event types
|
void |
subscribe(ScoreEventListener eventHandler,
Set<String> eventTypes)
register listener for event types
|
void |
unsubscribe(ScoreEventListener eventHandler)
remove the given handler
|
void subscribe(ScoreEventListener eventHandler, Set<String> eventTypes)
eventHandler
- - the handler of the eventseventTypes
- - the types of events you want to listen tovoid unsubscribe(ScoreEventListener eventHandler)
eventHandler
- - the listener to removevoid dispatch(ScoreEvent... eventWrappers) throws InterruptedException
eventWrappers
- one or more score event to dispatchInterruptedException
Copyright © 2020. All rights reserved.