Package com.slack.api.app_backend.events
Interface EventsDispatcher
- All Known Implementing Classes:
EventsDispatcherImpl
public interface EventsDispatcher
Events API requests dispatcher.
-
Method Summary
Modifier and Type Method Description voidderegister(EventHandler<? extends EventsApiPayload<?>> handler)Removes an EventHandler.voiddispatch(String json)Dispatches requests to appropriate event handlers.voidenqueue(String json)Enqueues a JSON payload to the internal queue.booleanisEmpty()booleanisRunning()voidregister(EventHandler<? extends EventsApiPayload<?>> handler)Registers a new EventHandler.voidstart()Starts the internal thread to handle requests.voidstop()Stops the internal thread to handle requests.
-
Method Details
-
isRunning
boolean isRunning() -
isEmpty
boolean isEmpty() -
register
Registers a new EventHandler. -
deregister
Removes an EventHandler. -
dispatch
Dispatches requests to appropriate event handlers. -
enqueue
Enqueues a JSON payload to the internal queue. -
start
void start()Starts the internal thread to handle requests. -
stop
void stop()Stops the internal thread to handle requests.
-