public class CliClient extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static java.util.function.Supplier<org.jline.terminal.Terminal> |
DEFAULT_TERMINAL_FACTORY |
Constructor and Description |
---|
CliClient(java.util.function.Supplier<org.jline.terminal.Terminal> terminalFactory,
String sessionId,
Executor executor,
Path historyFilePath)
Creates a CLI instance with a prepared terminal.
|
CliClient(java.util.function.Supplier<org.jline.terminal.Terminal> terminalFactory,
String sessionId,
Executor executor,
Path historyFilePath,
org.jline.reader.MaskingCallback inputTransformer)
Creates a CLI instance with a custom terminal.
|
Modifier and Type | Method and Description |
---|---|
void |
callExplain(ExplainOperation operation) |
void |
clearTerminal() |
void |
close()
Closes the CLI instance.
|
void |
executeInInteractiveMode()
Opens the interactive CLI shell.
|
boolean |
executeInitialization(String content) |
void |
executeInNonInteractiveMode(String content) |
Executor |
getExecutor() |
int |
getHeight() |
String |
getSessionId() |
org.jline.terminal.Terminal |
getTerminal() |
int |
getWidth() |
boolean |
isPlainTerminal() |
public static final java.util.function.Supplier<org.jline.terminal.Terminal> DEFAULT_TERMINAL_FACTORY
@VisibleForTesting public CliClient(java.util.function.Supplier<org.jline.terminal.Terminal> terminalFactory, String sessionId, Executor executor, Path historyFilePath, @Nullable org.jline.reader.MaskingCallback inputTransformer)
close()
.public CliClient(java.util.function.Supplier<org.jline.terminal.Terminal> terminalFactory, String sessionId, Executor executor, Path historyFilePath)
close()
.public org.jline.terminal.Terminal getTerminal()
public String getSessionId()
public void clearTerminal()
public boolean isPlainTerminal()
public int getWidth()
public int getHeight()
public Executor getExecutor()
public void close()
close
in interface AutoCloseable
public void executeInInteractiveMode()
public void executeInNonInteractiveMode(String content)
public boolean executeInitialization(String content)
public void callExplain(ExplainOperation operation)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.