public class EventsDispatcherImpl extends Object implements EventsDispatcher
| Constructor and Description |
|---|
EventsDispatcherImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister(EventHandler<? extends EventsApiPayload<?>> handler)
Removes an EventHandler.
|
void |
dispatch(String json)
Dispatches requests to appropriate event handlers.
|
void |
enqueue(String json)
Enqueues a JSON payload to the internal queue.
|
void |
register(EventHandler<? extends EventsApiPayload<?>> handler)
Registers a new EventHandler.
|
void |
start()
Starts the internal thread to handle requests.
|
void |
stop()
Stops the internal thread to handle requests.
|
public void register(EventHandler<? extends EventsApiPayload<?>> handler)
EventsDispatcherregister in interface EventsDispatcherpublic void deregister(EventHandler<? extends EventsApiPayload<?>> handler)
EventsDispatcherderegister in interface EventsDispatcherpublic void dispatch(String json)
EventsDispatcherdispatch in interface EventsDispatcherpublic void enqueue(String json)
EventsDispatcherenqueue in interface EventsDispatcherpublic void start()
EventsDispatcherstart in interface EventsDispatcherpublic void stop()
EventsDispatcherstop in interface EventsDispatcherCopyright © 2019. All Rights Reserved.