Package org.aesh.readline
Class ReadlineRequest
java.lang.Object
org.aesh.readline.ReadlineRequest
Encapsulates all parameters for a
Readline.readline(ReadlineRequest) call.
Use the builder() method to create instances via the builder pattern.
Example usage:
ReadlineRequest request = ReadlineRequest.builder()
.connection(conn)
.prompt(new Prompt("$ "))
.requestHandler(line -> System.out.println("Got: " + line))
.completions(myCompletions)
.build();
readline.readline(request);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for constructingReadlineRequestinstances. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReadlineRequest.Builderbuilder()Creates a new builder for constructing aReadlineRequest.Returns the list of completions for tab completion, or null if not set.Returns the terminal connection.Returns the cursor listener, or null if not set.flags()Returns the readline flags controlling behavior.history()Returns the history instance to use, or null to use the default.Returns the list of input pre-processors, or null if not set.prompt()Returns the prompt to display.Returns the callback to receive the completed input line.
-
Method Details
-
builder
Creates a new builder for constructing aReadlineRequest.- Returns:
- a new builder instance
-
connection
Returns the terminal connection.- Returns:
- the connection, never null
-
prompt
Returns the prompt to display.- Returns:
- the prompt, never null
-
requestHandler
Returns the callback to receive the completed input line.- Returns:
- the request handler, never null
-
completions
Returns the list of completions for tab completion, or null if not set.- Returns:
- the completions list, or null
-
preProcessors
Returns the list of input pre-processors, or null if not set.- Returns:
- the pre-processors list, or null
-
history
Returns the history instance to use, or null to use the default.- Returns:
- the history instance, or null
-
cursorListener
Returns the cursor listener, or null if not set.- Returns:
- the cursor listener, or null
-
flags
Returns the readline flags controlling behavior.- Returns:
- the flags map, never null
-