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

Latest commit

 

History

History
19 lines (12 loc) · 2.83 KB

File metadata and controls

19 lines (12 loc) · 2.83 KB

core / org.rewedigital.dialog.resolver / RequestResolver / <init>

<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.

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.