Interface UpdateProvider

  • All Known Implementing Classes:
    PollingUpdateProvider

    public interface UpdateProvider
    Listens for requests from Telegram's servers for one or more bots. The provider is owned by a registry and should call the registerUpdate() method in the bot registry when an update is received The update provider is expected to be given the owning registry in the constructor to do so.
    • Method Detail

      • listenFor

        void listenFor​(TelegramBot bot)
        Begin listening for updates for this bot
        Parameters:
        bot - The bot instance
      • stopListening

        void stopListening​(TelegramBot bot)
        Stop listening for updates for this bot
        Parameters:
        bot - The bot instance