Package org.infinispan.cli.impl
Class ContextAwareCommandInvocation
- java.lang.Object
-
- org.infinispan.cli.impl.ContextAwareCommandInvocation
-
- All Implemented Interfaces:
org.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
public class ContextAwareCommandInvocation extends Object implements org.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
- Since:
- 10.0
- Author:
- Tristan Tarrant <tristan@infinispan.org>
-
-
Constructor Summary
Constructors Constructor Description ContextAwareCommandInvocation(org.aesh.command.invocation.CommandInvocation commandInvocation, Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.aesh.command.Executor<ContextAwareCommandInvocation>buildExecutor(String line)voidexecuteCommand(String input)org.aesh.command.invocation.CommandInvocationConfigurationgetConfiguration()ContextgetContext()StringgetHelpInfo()StringgetHelpInfo(String commandName)StringgetPasswordInteractively(String prompt, String confirmPrompt)org.aesh.readline.PromptgetPrompt()org.aesh.command.shell.ShellgetShell()PrintStreamgetShellError()PrintStreamgetShellOutput()org.aesh.readline.action.KeyActioninput()StringinputLine()StringinputLine(org.aesh.readline.Prompt prompt)voidprint(String msg)voidprint(String msg, boolean paging)voidprintf(String format, Object... args)voidprintln(String msg)voidprintln(String msg, boolean paging)voidsetPrompt(org.aesh.readline.Prompt prompt)voidstop()
-
-
-
Constructor Detail
-
ContextAwareCommandInvocation
public ContextAwareCommandInvocation(org.aesh.command.invocation.CommandInvocation commandInvocation, Context context)
-
-
Method Detail
-
getShell
public org.aesh.command.shell.Shell getShell()
- Specified by:
getShellin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
setPrompt
public void setPrompt(org.aesh.readline.Prompt prompt)
- Specified by:
setPromptin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
getPrompt
public org.aesh.readline.Prompt getPrompt()
- Specified by:
getPromptin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
getHelpInfo
public String getHelpInfo(String commandName)
- Specified by:
getHelpInfoin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
getHelpInfo
public String getHelpInfo()
- Specified by:
getHelpInfoin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
stop
public void stop()
- Specified by:
stopin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
getConfiguration
public org.aesh.command.invocation.CommandInvocationConfiguration getConfiguration()
- Specified by:
getConfigurationin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
input
public org.aesh.readline.action.KeyAction input() throws InterruptedException- Specified by:
inputin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>- Throws:
InterruptedException
-
inputLine
public String inputLine() throws InterruptedException
- Specified by:
inputLinein interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>- Throws:
InterruptedException
-
inputLine
public String inputLine(org.aesh.readline.Prompt prompt) throws InterruptedException
- Specified by:
inputLinein interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>- Throws:
InterruptedException
-
executeCommand
public void executeCommand(String input) throws org.aesh.command.CommandNotFoundException, org.aesh.command.parser.CommandLineParserException, org.aesh.command.validator.OptionValidatorException, org.aesh.command.validator.CommandValidatorException, org.aesh.command.CommandException, InterruptedException, IOException
- Specified by:
executeCommandin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>- Throws:
org.aesh.command.CommandNotFoundExceptionorg.aesh.command.parser.CommandLineParserExceptionorg.aesh.command.validator.OptionValidatorExceptionorg.aesh.command.validator.CommandValidatorExceptionorg.aesh.command.CommandExceptionInterruptedExceptionIOException
-
buildExecutor
public org.aesh.command.Executor<ContextAwareCommandInvocation> buildExecutor(String line) throws org.aesh.command.CommandNotFoundException, org.aesh.command.parser.CommandLineParserException, org.aesh.command.validator.OptionValidatorException, org.aesh.command.validator.CommandValidatorException, IOException
- Specified by:
buildExecutorin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>- Throws:
org.aesh.command.CommandNotFoundExceptionorg.aesh.command.parser.CommandLineParserExceptionorg.aesh.command.validator.OptionValidatorExceptionorg.aesh.command.validator.CommandValidatorExceptionIOException
-
print
public void print(String msg)
- Specified by:
printin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
println
public void println(String msg)
- Specified by:
printlnin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
print
public void print(String msg, boolean paging)
- Specified by:
printin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
println
public void println(String msg, boolean paging)
- Specified by:
printlnin interfaceorg.aesh.command.invocation.CommandInvocation<ContextAwareCommandInvocation>
-
getContext
public Context getContext()
-
getShellOutput
public PrintStream getShellOutput()
-
getShellError
public PrintStream getShellError()
-
getPasswordInteractively
public String getPasswordInteractively(String prompt, String confirmPrompt) throws InterruptedException
- Throws:
InterruptedException
-
-