Interface PostSender<T,R>

Type Parameters:
T - the type of the method to be sent
R - the type of the response received after sending
All Known Implementing Classes:
AnimationSender, MediaGroupSender, PhotoSender, UrlSender, VideoSender
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PostSender<T,R>
A functional interface for sending posts to Telegram.
  • Method Summary

    Modifier and Type
    Method
    Description
    send(T method)
    Sends the given method to Telegram.
  • Method Details

    • send

      R send(T method) throws IOException, org.telegram.telegrambots.meta.exceptions.TelegramApiException
      Sends the given method to Telegram.
      Parameters:
      method - the method to be sent
      Returns:
      the response received after sending
      Throws:
      IOException - if an I/O error occurs
      org.telegram.telegrambots.meta.exceptions.TelegramApiException - if a Telegram API error occurs