All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.telegram.telegrambots.abilitybots.api.sender.SentCallback Maven / Gradle / Ivy

There is a newer version: 7.10.0
Show newest version
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