public class BotHandlerMethodReturnValueHandlerComposite extends Object implements BotHandlerMethodReturnValueHandler
BotHandlerMethodReturnValueHandler
handlers.| Constructor and Description |
|---|
BotHandlerMethodReturnValueHandlerComposite(@NotNull List<BotHandlerMethodReturnValueHandler> handlers)
Create a composite handler for the given
BotHandlerMethodReturnValueHandlers. |
| Modifier and Type | Method and Description |
|---|---|
com.pengrad.telegrambot.request.BaseRequest |
handleReturnValue(Object returnValue,
org.springframework.core.MethodParameter returnType,
TelegramRequest telegramRequest)
Iterate over registered
BotHandlerMethodReturnValueHandlers and invoke the one that supports it. |
boolean |
supportsReturnType(org.springframework.core.MethodParameter returnType)
Whether the given method return type is supported by this handler.
|
public BotHandlerMethodReturnValueHandlerComposite(@NotNull
@NotNull List<BotHandlerMethodReturnValueHandler> handlers)
BotHandlerMethodReturnValueHandlers.handlers - handlers to addpublic boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
BotHandlerMethodReturnValueHandlersupportsReturnType in interface BotHandlerMethodReturnValueHandlerreturnType - the method return type to checktrue if this handler supports the supplied return type; false otherwisepublic com.pengrad.telegrambot.request.BaseRequest handleReturnValue(Object returnValue, org.springframework.core.MethodParameter returnType, TelegramRequest telegramRequest)
BotHandlerMethodReturnValueHandlers and invoke the one that supports it.handleReturnValue in interface BotHandlerMethodReturnValueHandlerreturnValue - method result to handlereturnType - the method parameter to resolve. This parameter must have previously been passed to BotHandlerMethodReturnValueHandler.supportsReturnType(org.springframework.core.MethodParameter) which must have returned true.telegramRequest - the current telegram requestnull if not resolvableCopyright © 2022. All rights reserved.