Interface SentCallback<T extends Serializable>
-
public interface SentCallback<T extends Serializable>
- Version:
- 1.0
- Author:
- Ruben Bermudez
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onError(BotApiMethod<T> method, TelegramApiRequestException apiException)
Called when the request failsvoid
onException(BotApiMethod<T> method, Exception exception)
Called when the http request throw an exceptionvoid
onResult(BotApiMethod<T> method, T response)
Called when the request is successful
-
-
-
Method Detail
-
onResult
void onResult(BotApiMethod<T> method, T response)
Called when the request is successful- Parameters:
method
- Method executedresponse
- Answer from Telegram server
-
onError
void onError(BotApiMethod<T> method, TelegramApiRequestException apiException)
Called when the request fails- Parameters:
method
- Method executedapiException
- 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 executedexception
- Excepction thrown
-
-