Package com.slack.api.app_backend.events
Class EventsDispatcherImpl
java.lang.Object
com.slack.api.app_backend.events.EventsDispatcherImpl
- All Implemented Interfaces:
EventsDispatcher
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidderegister(EventHandler<? extends EventsApiPayload<?>> handler) Removes an EventHandler.voidDispatches requests to appropriate event handlers.voidEnqueues a JSON payload to the internal queue.longbooleanisEmpty()booleanvoidregister(EventHandler<? extends EventsApiPayload<?>> handler) Registers a new EventHandler.voidsetMaxTerminationDelayMillis(long maxTerminationDelayMillis) voidstart()Starts the internal thread to handle requests.voidstop()Stops the internal thread to handle requests.
-
Constructor Details
-
EventsDispatcherImpl
public EventsDispatcherImpl() -
EventsDispatcherImpl
-
-
Method Details
-
getMaxTerminationDelayMillis
public long getMaxTerminationDelayMillis() -
setMaxTerminationDelayMillis
public void setMaxTerminationDelayMillis(long maxTerminationDelayMillis) -
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceEventsDispatcher
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceEventsDispatcher
-
register
Description copied from interface:EventsDispatcherRegisters a new EventHandler.- Specified by:
registerin interfaceEventsDispatcher
-
deregister
Description copied from interface:EventsDispatcherRemoves an EventHandler.- Specified by:
deregisterin interfaceEventsDispatcher
-
dispatch
Description copied from interface:EventsDispatcherDispatches requests to appropriate event handlers.- Specified by:
dispatchin interfaceEventsDispatcher
-
enqueue
Description copied from interface:EventsDispatcherEnqueues a JSON payload to the internal queue.- Specified by:
enqueuein interfaceEventsDispatcher
-
start
public void start()Description copied from interface:EventsDispatcherStarts the internal thread to handle requests.- Specified by:
startin interfaceEventsDispatcher
-
stop
public void stop()Description copied from interface:EventsDispatcherStops the internal thread to handle requests.- Specified by:
stopin interfaceEventsDispatcher
-