Class EventPollerConfiguration
java.lang.Object
com.github.jamesnetherton.zulip.client.api.event.EventPollerConfiguration
Configuration items for the
EventPoller.-
Method Summary
Modifier and TypeMethodDescriptionGets theMessageEventListenerconfigured viaEventService.captureMessageEvents(MessageEventListener, Narrow...).Map<String, List<EventListener<Event>>> Gets the event listeners keyed by the Zulip event type name.Narrow[]booleanvoidsetAllPublicStreams(boolean allPublicStreams) Sets whether to request message events from all public channels.voidsetEventListenerExecutorService(ExecutorService eventListenerExecutorService) Sets a custom executor to use for processing message events.voidsetIdleQueueTimeout(Integer idleQueueTimeout) Sets the minimum number of seconds that the server should keep the event queue alive when it is not being polled.voidsetNarrows(Narrow[] narrows) Sets theNarrowexpressions to filter which message events are captured.
-
Method Details
-
getListener
Gets theMessageEventListenerconfigured viaEventService.captureMessageEvents(MessageEventListener, Narrow...).- Returns:
- The
MessageEventListenerornullif theEventPollerwas created withEventService.captureEvents()
-
getClient
-
getListeners
Gets the event listeners keyed by the Zulip event type name.- Returns:
- Unmodifiable map of event type names to event listeners
-
getNarrows
-
setNarrows
-
getEventListenerExecutorService
-
setEventListenerExecutorService
Sets a custom executor to use for processing message events.- Parameters:
eventListenerExecutorService- CustomExecutorServiceto use for message event listener execution
-
isAllPublicStreams
public boolean isAllPublicStreams() -
setAllPublicStreams
public void setAllPublicStreams(boolean allPublicStreams) Sets whether to request message events from all public channels.- Parameters:
allPublicStreams-trueto request message events from all public channels.falseto not include message events from all public channels
-
getIdleQueueTimeout
-
setIdleQueueTimeout
Sets the minimum number of seconds that the server should keep the event queue alive when it is not being polled.- Parameters:
idleQueueTimeout- The idle queue timeout in seconds
-