Class BotResponse

java.lang.Object
uz.osoncode.telegrambothandler.core.model.BotResponse

public class BotResponse extends Object
Mutable response object that accumulates BotApiMethod instances produced by handler methods. Collected methods are later executed by the BotApiMethodsSenderFilter after the handler chain completes.
Since:
0.0.1
Author:
Islom Mirsaburov
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addBotApiMethod(org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?> botApiMethod)
    Appends a single BotApiMethod to the response queue.
    void
    addBotApiMethods(Collection<org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?>> botApiMethods)
    Appends all elements from the given collection of BotApiMethod instances to the response queue.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BotResponse

      public BotResponse()
  • Method Details

    • addBotApiMethod

      public void addBotApiMethod(org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?> botApiMethod)
      Appends a single BotApiMethod to the response queue.
      Parameters:
      botApiMethod - the API method to queue for execution; must not be null
    • addBotApiMethods

      public void addBotApiMethods(Collection<org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?>> botApiMethods)
      Appends all elements from the given collection of BotApiMethod instances to the response queue.
      Parameters:
      botApiMethods - the collection of API methods to queue; must not be null