org.telegram.telegrambots.abilitybots.api.sender.SentCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegrambots-abilities Show documentation
Show all versions of telegrambots-abilities Show documentation
AbilityBot Extension and Abstraction
package org.telegram.telegrambots.abilitybots.api.sender;
import org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod;
import java.io.Serializable;
/**
* @author Ruben Bermudez
* @version 1.0
* Callback to execute api method asynchronously
*/
public interface SentCallback {
/**
* Called when the request is successful
* @param method Method executed
* @param response Answer from Telegram server
*/
void onResult(BotApiMethod method, T response);
/**
* Called when an exception is thrown
* @param method Method executed
* @param exception Exception thrown
*/
void onException(BotApiMethod method, Exception exception);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy