Package ai.tock.bot.definition
Class ConfigurableStoryHandler
-
- All Implemented Interfaces:
-
ai.tock.bot.definition.IntentAware,ai.tock.bot.definition.StoryHandler,ai.tock.translator.I18nKeyProvider
public class ConfigurableStoryHandler<T extends StoryHandlerDefinition> extends StoryHandlerBase<T>
A story handler that can be fully configured. Advanced usage only.
-
-
Constructor Summary
Constructors Constructor Description ConfigurableStoryHandler(String mainIntentName, HandlerStoryDefinitionCreator<T> handlerDefCreator, Function1<BotBus, Object> preconditionsChecker, String i18nNamespace, Long breath)
-
Method Summary
Modifier and Type Method Description TnewHandlerDefinition(BotBus bus, Object data)Instantiates new instance of T. Function1<BotBus, Object>checkPreconditions()Checks preconditions - if BotBus.end is called, StoryHandlerDefinition.handle is not called and the handling of bot answer is over. -
Methods inherited from class ai.tock.bot.definition.StoryHandlerBase
findStoryDefinition, getBreath, handle, handleAndSwitchStory, i18n, i18nKey, i18nKey, selectStepFromStoryHandlerAndData, support, wrappedIntent -
Methods inherited from class ai.tock.translator.I18nKeyProvider
i18n -
Methods inherited from class ai.tock.bot.definition.IntentAware
intentWithoutNamespace, wrap -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
newHandlerDefinition
T newHandlerDefinition(BotBus bus, Object data)
Instantiates new instance of T.
-
checkPreconditions
Function1<BotBus, Object> checkPreconditions()
Checks preconditions - if BotBus.end is called, StoryHandlerDefinition.handle is not called and the handling of bot answer is over.
-
-
-
-