core / org.rewedigital.dialog.resolver / RequestResolver
class RequestResolver
RequestResolver handles incoming WebhookRequest, the DialogflowIntentHandler.canHandleDialogflowIntent from all given DialogflowIntentHandler will be called to figure out witch DialogflowIntentHandler can handle the incoming WebhookRequest.
The first DialogflowIntentHandler that DialogflowIntentHandler.canHandleDialogflowIntent returns true will be used to handle the WebhookRequest. Therefor the DialogflowIntentHandler.handleDialogflowIntent function will be called.
If there is no matching DialogflowIntentHandler the fallbackAction will be triggered.
It's possible to provide RequestInterceptor and ResponseInterceptor, they will be triggered for every incoming WebhookRequest and outgoing WebhookResponse.
Name | Summary |
---|---|
<init> | RequestResolver(intentHandlers: List < DialogflowIntentHandler >, requestInterceptors: List < RequestInterceptor >, responseInterceptors: List < ResponseInterceptor >, fallbackAction: ( DialogflowHandler ) -> DialogflowResponseBuilder ?) RequestResolver handles incoming WebhookRequest, the DialogflowIntentHandler.canHandleDialogflowIntent from all given DialogflowIntentHandler will be called to figure out witch DialogflowIntentHandler can handle the incoming WebhookRequest. |
Name | Summary |
---|---|
resolveRequest | fun resolveRequest(webhookRequest: WebhookRequest ): WebhookResponse ? |