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

org.telegram.telegraph.executors.TelegraphExecutor Maven / Gradle / Ivy

The newest version!
package org.telegram.telegraph.executors;

import org.telegram.telegraph.api.TelegraphMethod;
import org.telegram.telegraph.api.TelegraphObject;
import org.telegram.telegraph.exceptions.TelegraphException;

/**
 * @author Ruben Bermudez
 * @version 1.0
 * Base interface to execute a method, support any custom implementation. Library will create instances of this class
 * via TelegraphExecutorFactory when necessary.
 */
public interface TelegraphExecutor {
    /**
     * Executes a method and returns its result
     * @param method Method to execute
     * @param  Type of method result
     * @return Results of the method
     * @throws TelegraphException If validation or requests fails
     */
     T execute(TelegraphMethod method) throws TelegraphException;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy