Interface SentCallback<T extends Serializable>


  • public interface SentCallback<T extends Serializable>
    Version:
    1.0
    Author:
    Ruben Bermudez
    • Method Detail

      • onResult

        void onResult​(BotApiMethod<T> method,
                      T response)
        Called when the request is successful
        Parameters:
        method - Method executed
        response - Answer from Telegram server
      • onError

        void onError​(BotApiMethod<T> method,
                     TelegramApiRequestException apiException)
        Called when the request fails
        Parameters:
        method - Method executed
        apiException - Answer from Telegram server (contains error information)
      • onException

        void onException​(BotApiMethod<T> method,
                         Exception exception)
        Called when the http request throw an exception
        Parameters:
        method - Method executed
        exception - Excepction thrown