Class BotSession
Object
BotSession
- All Implemented Interfaces:
AutoCloseable
-
Constructor Summary
ConstructorsConstructorDescriptionBotSession(ObjectMapper objectMapper, OkHttpClient okHttpClient, ScheduledExecutorService executor, String botToken, Supplier<TelegramUrl> telegramUrlSupplier, Function<Integer, GetUpdates> getUpdatesGenerator, Supplier<BackOff> backOffSupplier, LongPollingUpdateConsumer updatesConsumer) -
Method Summary
-
Constructor Details
-
BotSession
public BotSession(ObjectMapper objectMapper, OkHttpClient okHttpClient, ScheduledExecutorService executor, String botToken, Supplier<TelegramUrl> telegramUrlSupplier, Function<Integer, GetUpdates> getUpdatesGenerator, Supplier<BackOff> backOffSupplier, LongPollingUpdateConsumer updatesConsumer)
-
-
Method Details
-
start
- Throws:
TelegramApiException
-
stop
public void stop() -
isRunning
public boolean isRunning() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
TelegramApiException
-