org.telegram.bot.GenericErrorTelegramFunctionCallback Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of telegramapi Show documentation
Show all versions of telegramapi Show documentation
Java library to create Telegram Clients
package org.telegram.bot;
import org.telegram.api.engine.RpcException;
import org.telegram.api.engine.TimeoutException;
import org.telegram.tl.TLObject;
/**
* @author Ruben Bermudez
* @version 1.0
* @brief Callback to execute telegram api method
* @date 26 of September of 2015
*/
public abstract class GenericErrorTelegramFunctionCallback implements TelegramFunctionCallback {
@Override
public void onRpcError(RpcException e) {
onError(e);
}
@Override
public void onTimeout(TimeoutException e) {
onError(e);
}
@Override
public void onUnknownError(Throwable e) {
onError(e);
}
public abstract void onError(Throwable e);
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy