Interface LongPollingBot
-
- All Superinterfaces:
TelegramBot
public interface LongPollingBot extends TelegramBot
- Version:
- 1.0
- Author:
- Ruben Bermudez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
clearWebhook()
Clear current webhook (if present) calling setWebhook method with empty url.BotOptions
getOptions()
Gets options for current botdefault void
onClosing()
Called when the BotSession is being closedvoid
onUpdateReceived(Update update)
This method is called when receiving updates via GetUpdates methoddefault void
onUpdatesReceived(List<Update> updates)
This method is called when receiving updates via GetUpdates method.-
Methods inherited from interface org.telegram.telegrambots.meta.generics.TelegramBot
getBotToken, getBotUsername, onRegister
-
-
-
-
Method Detail
-
onUpdateReceived
void onUpdateReceived(Update update)
This method is called when receiving updates via GetUpdates method- Parameters:
update
- Update received
-
onUpdatesReceived
default void onUpdatesReceived(List<Update> updates)
This method is called when receiving updates via GetUpdates method. If not reimplemented - it just sends updates by one intoonUpdateReceived(Update)
- Parameters:
updates
- list of Update received
-
getOptions
BotOptions getOptions()
Gets options for current bot- Returns:
- BotOptions object with options information
-
clearWebhook
void clearWebhook() throws TelegramApiRequestException
Clear current webhook (if present) calling setWebhook method with empty url.- Throws:
TelegramApiRequestException
-
onClosing
default void onClosing()
Called when the BotSession is being closed
-
-