Package io.micronaut.chatbots.core
Interface Handler<B extends BotConfiguration,I,O>
- Type Parameters:
B
- The Bot configurationI
- input type.O
- output type.
- All Superinterfaces:
io.micronaut.core.order.Ordered
- All Known Subinterfaces:
BasecampHandler
,TelegramHandler<O>
- All Known Implementing Classes:
CommandHandler
Request handlers are responsible for handling one or more types of incoming requests.
- Since:
- 1.0.0
- Author:
- Sergio del Amo
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Method Summary
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Method Details
-
canHandle
Returns true if the handler can dispatch the current request.- Parameters:
bot
- bot being asked to handle this commandinput
- input to the request handler- Returns:
- true if the handler is capable of handling the current request
-
handle
Handles the request.- Parameters:
bot
- bot being asked to handle this commandinput
- input to the request handler- Returns:
- output from the handler. Empty if you want to respond asynchronously.
-