tock / ai.tock.bot.definition / ConfigurableStoryHandler

ConfigurableStoryHandler

open class ConfigurableStoryHandler<out T : StoryHandlerDefinition> : StoryHandlerBase<T> (source)

A story handler that can be fully configured. Advanced usage only.

Constructors

<init>

A story handler that can be fully configured. Advanced usage only.

ConfigurableStoryHandler(mainIntentName: String? = null, handlerDefCreator: HandlerStoryDefinitionCreator<T>, preconditionsChecker: BotBus.() -> Any?, i18nNamespace: String = defaultNamespace, breath: Long = BotDefinition.defaultBreath)

Functions

checkPreconditions

Checks preconditions - if BotBus.end is called, StoryHandlerDefinition.handle is not called and the handling of bot answer is over.

open fun checkPreconditions(): BotBus.() -> Any?

newHandlerDefinition

Instantiates new instance of T.

open fun newHandlerDefinition(bus: BotBus, data: Any?): T