public class ConfigurableStoryHandler<T extends StoryHandlerDefinition>
extends StoryHandlerBase
A story handler that can be fully configured. Advanced usage only.
public ConfigurableStoryHandler(@Nullable
java.lang.String mainIntentName,
@NotNull
HandlerStoryDefinitionCreator<T> handlerDefCreator,
@NotNull
kotlin.jvm.functions.Function1<? super ai.tock.bot.engine.BotBus,? extends java.lang.Object> preconditionsChecker,
@NotNull
java.lang.String i18nNamespace,
long breath)
A story handler that can be fully configured. Advanced usage only.
mainIntentName - The main intent of the story definition.handlerDefCreator - The HandlerDef creator. Defines StoryHandlerBase.newHandlerDefinition.preconditionsChecker - Check preconditions. if BotBus.end is called in this function,StoryHandlerDefinition.handle is not called and the handling of bot answer is over.i18nNamespace - The namespace for I18nKeyProvider implementation.breath - Convenient value to wait before next answer sentence.@NotNull
public T newHandlerDefinition(@NotNull
BotBus bus,
@Nullable
java.lang.Object data)
Instantiates new instance of T.
@NotNull public kotlin.jvm.functions.Function1<ai.tock.bot.engine.BotBus,java.lang.Object> checkPreconditions()
Checks preconditions - if BotBus.end is called,
StoryHandlerDefinition.handle is not called and the handling of bot answer is over.
BotBus.end,
StoryHandlerDefinition.handle