public final class DialogueUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <I extends InputTurn,O extends OutputTurn> |
doTurn(O outputTurn,
DialogueContext<I,O> context)
Performs turn exchange with default timeout.
|
static <I extends InputTurn,O extends OutputTurn> |
doTurn(O outputTurn,
DialogueContext<I,O> context,
Duration timeout)
Performs turn exchange with specified timeout.
|
public static <I extends InputTurn,O extends OutputTurn> I doTurn(O outputTurn, DialogueContext<I,O> context) throws Timeout, InterruptedException
I
- input turn type.O
- output turn type.outputTurn
- the output turn to return to the controller (i.e. the
servlet).context
- the dialogue context.Timeout
- if controller did not provided the input turn within the
allocated time (default timeout)InterruptedException
- if the dialogue was interrupted.public static <I extends InputTurn,O extends OutputTurn> I doTurn(O outputTurn, DialogueContext<I,O> context, Duration timeout) throws Timeout, InterruptedException
I
- input turn type.O
- output turn type.outputTurn
- the output turn to return to the controller (i.e. the
servlet).context
- the dialogue context.timeout
- maximum delay for the controller to provide the input
turn.Timeout
- if controller did not provided the input turn within the
allocated time (as provided by the timeout
parameter)InterruptedException
- if the dialogue was interrupted.Copyright © 2019 Nu Echo Inc..