public class EventsDispatcherImpl extends Object implements EventsDispatcher
| Constructor and Description |
|---|
EventsDispatcherImpl() |
EventsDispatcherImpl(EventTypeExtractor eventTypeExtractor) |
| 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.
|
long |
getMaxTerminationDelayMillis() |
boolean |
isEmpty() |
boolean |
isRunning() |
void |
register(EventHandler<? extends EventsApiPayload<?>> handler)
Registers a new EventHandler.
|
void |
setMaxTerminationDelayMillis(long maxTerminationDelayMillis) |
void |
start()
Starts the internal thread to handle requests.
|
void |
stop()
Stops the internal thread to handle requests.
|
public EventsDispatcherImpl()
public EventsDispatcherImpl(EventTypeExtractor eventTypeExtractor)
public long getMaxTerminationDelayMillis()
public void setMaxTerminationDelayMillis(long maxTerminationDelayMillis)
public boolean isRunning()
isRunning in interface EventsDispatcherpublic boolean isEmpty()
isEmpty in interface EventsDispatcherpublic 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 © 2020. All rights reserved.