Interface SentCallback<T extends Serializable>


public interface SentCallback<T extends Serializable>
Version:
1.0 Callback to execute api method asynchronously
Author:
Ruben Bermudez
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onException(BotApiMethod<T> method, Exception exception)
    Called when an exception is thrown
    void
    onResult(BotApiMethod<T> method, T response)
    Called when the request is successful
  • Method Details

    • onResult

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

      void onException(BotApiMethod<T> method, Exception exception)
      Called when an exception is thrown
      Parameters:
      method - Method executed
      exception - Exception thrown