Package com.jtelegram.api.update
Class PollingUpdateProvider.PollingUpdateProviderBuilder
- java.lang.Object
-
- com.jtelegram.api.update.PollingUpdateProvider.PollingUpdateProviderBuilder
-
- Enclosing class:
- PollingUpdateProvider
public static class PollingUpdateProvider.PollingUpdateProviderBuilder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollingUpdateProvider.PollingUpdateProviderBuilder
allowedUpdate(UpdateType allowedUpdate)
PollingUpdateProvider.PollingUpdateProviderBuilder
allowedUpdates(java.util.Collection<? extends UpdateType> allowedUpdates)
PollingUpdateProvider
build()
PollingUpdateProvider.PollingUpdateProviderBuilder
clearAllowedUpdates()
PollingUpdateProvider.PollingUpdateProviderBuilder
maxUpdateAge(long maxUpdateAge)
The max age (in seconds) that an update can be.PollingUpdateProvider.PollingUpdateProviderBuilder
sleepInterval(int sleepInterval)
PollingUpdateProvider.PollingUpdateProviderBuilder
timeout(int timeout)
java.lang.String
toString()
PollingUpdateProvider.PollingUpdateProviderBuilder
updateErrorHandler(java.util.function.Consumer<TelegramException> updateErrorHandler)
-
-
-
Method Detail
-
sleepInterval
public PollingUpdateProvider.PollingUpdateProviderBuilder sleepInterval(int sleepInterval)
-
timeout
public PollingUpdateProvider.PollingUpdateProviderBuilder timeout(int timeout)
-
maxUpdateAge
public PollingUpdateProvider.PollingUpdateProviderBuilder maxUpdateAge(long maxUpdateAge)
The max age (in seconds) that an update can be. If the data is available and the update is older than maxUpdateAge seconds, then it is silently ignored. By default, this feature is disabled.- See Also:
Update.TimeSensitiveUpdate
-
allowedUpdate
public PollingUpdateProvider.PollingUpdateProviderBuilder allowedUpdate(UpdateType allowedUpdate)
-
allowedUpdates
public PollingUpdateProvider.PollingUpdateProviderBuilder allowedUpdates(java.util.Collection<? extends UpdateType> allowedUpdates)
-
clearAllowedUpdates
public PollingUpdateProvider.PollingUpdateProviderBuilder clearAllowedUpdates()
-
updateErrorHandler
public PollingUpdateProvider.PollingUpdateProviderBuilder updateErrorHandler(java.util.function.Consumer<TelegramException> updateErrorHandler)
-
build
public PollingUpdateProvider build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-