Class TelegramServiceRestBotAPIAdapter
- java.lang.Object
-
- org.apache.camel.component.telegram.service.TelegramServiceRestBotAPIAdapter
-
- All Implemented Interfaces:
TelegramService
public class TelegramServiceRestBotAPIAdapter extends Object implements TelegramService
Adapts theRestBotAPIto theTelegramServiceinterface.
-
-
Constructor Summary
Constructors Constructor Description TelegramServiceRestBotAPIAdapter(java.net.http.HttpClient client, String telegramBaseUri, String authorizationToken, int bufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateResultgetUpdates(Long offset, Integer limit, Integer timeoutSeconds)booleanremoveWebhook()voidsendMessage(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, OutgoingMessage message)booleansetWebhook(String url)
-
-
-
Method Detail
-
getUpdates
public UpdateResult getUpdates(Long offset, Integer limit, Integer timeoutSeconds)
- Specified by:
getUpdatesin interfaceTelegramService
-
setWebhook
public boolean setWebhook(String url)
- Specified by:
setWebhookin interfaceTelegramService
-
removeWebhook
public boolean removeWebhook()
- Specified by:
removeWebhookin interfaceTelegramService
-
sendMessage
public void sendMessage(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback, OutgoingMessage message)- Specified by:
sendMessagein interfaceTelegramService
-
-