Class Dialog

java.lang.Object
io.xpipe.core.dialog.Dialog
Direct Known Subclasses:
Dialog.Choice, Dialog.Query

public abstract class Dialog extends Object
A Dialog is a sequence of questions and answers.

The dialogue API is only used for the command line interface. Therefore, the actual implementation is handled by the command line component. This API provides a way of creating server-side dialogues which makes it possible to create extensions that provide a commandline configuration component.

When a Dialog is completed, it can also be optionally evaluated to a value, which can be queried by calling getResult(). The evaluation function can be set with evaluateTo(Supplier). Alternatively, a dialogue can also copy the evaluation function of another dialogue with evaluateTo(Dialog). An evaluation result can also be mapped to another type with map(Function). It is also possible to listen for the completion of this dialogue with onCompletion(FailableConsumer).