Class RequestInterceptor.RequestContinuation
java.lang.Object
com.vaadin.flow.component.ai.orchestrator.RequestInterceptor.RequestContinuation
- All Implemented Interfaces:
Serializable
- Enclosing interface:
RequestInterceptor
public static final class RequestInterceptor.RequestContinuation
extends Object
implements Serializable
Handle for completing a prompt postponed via
RequestInterceptor.RequestInterceptEvent.postpone(Duration). Complete it from any
thread; completion is first-wins — once the prompt has proceeded, failed,
or timed out, later completions are ignored.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidAborts the postponed prompt: nothing is sent or shown, and the cause is reported to theResponseListenerandAIController.onResponse(Throwable).voidproceed()Resumes the postponed prompt with the event's current content.
-
Method Details
-
proceed
public void proceed()Resumes the postponed prompt with the event's current content. The event must not be changed afterwards. A no-op when the prompt has already been completed or timed out. -
fail
Aborts the postponed prompt: nothing is sent or shown, and the cause is reported to theResponseListenerandAIController.onResponse(Throwable). Safe to call when the UI is already detached: theResponseListeneris still notified, only the UI-bound controller hook is skipped. A no-op when the prompt has already been completed or timed out.- Parameters:
cause- the failure to report, notnull- Throws:
NullPointerException- ifcauseisnull
-