Interface SentCallback<T extends Serializable>
public interface SentCallback<T extends Serializable>
- Version:
- 1.0
- Author:
- Ruben Bermudez
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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 Details
-
onResult
Called when the request is successful- Parameters:
method
- Method executedresponse
- Answer from Telegram server
-
onError
Called when the request fails- Parameters:
method
- Method executedapiException
- Answer from Telegram server (contains error information)
-
onException
Called when the http request throw an exception- Parameters:
method
- Method executedexception
- Excepction thrown
-