Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Latest commit

 

History

History
30 lines (20 loc) · 3.86 KB

File metadata and controls

30 lines (20 loc) · 3.86 KB

core / org.rewedigital.dialog.resolver / RequestResolver

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.

Constructors

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.

Functions

Name Summary
resolveRequest fun resolveRequest(webhookRequest: WebhookRequest): WebhookResponse?