Class BotResponse
java.lang.Object
uz.osoncode.telegrambothandler.core.model.BotResponse
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBotApiMethod(org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?> botApiMethod) Appends a singleBotApiMethodto the response queue.voidaddBotApiMethods(Collection<org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?>> botApiMethods) Appends all elements from the given collection ofBotApiMethodinstances to the response queue.
-
Constructor Details
-
BotResponse
public BotResponse()
-
-
Method Details
-
addBotApiMethod
public void addBotApiMethod(org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?> botApiMethod) Appends a singleBotApiMethodto the response queue.- Parameters:
botApiMethod- the API method to queue for execution; must not benull
-
addBotApiMethods
public void addBotApiMethods(Collection<org.telegram.telegrambots.meta.api.methods.botapimethods.BotApiMethod<?>> botApiMethods) Appends all elements from the given collection ofBotApiMethodinstances to the response queue.- Parameters:
botApiMethods- the collection of API methods to queue; must not benull
-