Class ContextAwareCommandInvocation

java.lang.Object
org.infinispan.cli.impl.ContextAwareCommandInvocation
All Implemented Interfaces:
org.aesh.command.invocation.CommandInvocation

public class ContextAwareCommandInvocation extends Object implements org.aesh.command.invocation.CommandInvocation
Since:
10.0
Author:
Tristan Tarrant <tristan@infinispan.org>
  • Constructor Details

    • ContextAwareCommandInvocation

      public ContextAwareCommandInvocation(org.aesh.command.invocation.CommandInvocation commandInvocation, Context context)
  • Method Details

    • getShell

      public org.aesh.command.shell.Shell getShell()
      Specified by:
      getShell in interface org.aesh.command.invocation.CommandInvocation
    • setPrompt

      public void setPrompt(org.aesh.readline.Prompt prompt)
      Specified by:
      setPrompt in interface org.aesh.command.invocation.CommandInvocation
    • getPrompt

      public org.aesh.readline.Prompt getPrompt()
      Specified by:
      getPrompt in interface org.aesh.command.invocation.CommandInvocation
    • getHelpInfo

      public String getHelpInfo(String commandName)
      Specified by:
      getHelpInfo in interface org.aesh.command.invocation.CommandInvocation
    • getHelpInfo

      public String getHelpInfo()
      Specified by:
      getHelpInfo in interface org.aesh.command.invocation.CommandInvocation
    • stop

      public void stop()
      Specified by:
      stop in interface org.aesh.command.invocation.CommandInvocation
    • getConfiguration

      public org.aesh.command.invocation.CommandInvocationConfiguration getConfiguration()
      Specified by:
      getConfiguration in interface org.aesh.command.invocation.CommandInvocation
    • input

      public org.aesh.readline.action.KeyAction input() throws InterruptedException
      Specified by:
      input in interface org.aesh.command.invocation.CommandInvocation
      Throws:
      InterruptedException
    • input

      public org.aesh.readline.action.KeyAction input(long timeout, TimeUnit unit) throws InterruptedException
      Specified by:
      input in interface org.aesh.command.invocation.CommandInvocation
      Throws:
      InterruptedException
    • inputLine

      public String inputLine() throws InterruptedException
      Specified by:
      inputLine in interface org.aesh.command.invocation.CommandInvocation
      Throws:
      InterruptedException
    • inputLine

      public String inputLine(org.aesh.readline.Prompt prompt) throws InterruptedException
      Specified by:
      inputLine in interface org.aesh.command.invocation.CommandInvocation
      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:
      executeCommand in interface org.aesh.command.invocation.CommandInvocation
      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
    • buildExecutor

      public org.aesh.command.Executor<? extends org.aesh.command.invocation.CommandInvocation> 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:
      buildExecutor in interface org.aesh.command.invocation.CommandInvocation
      Throws:
      org.aesh.command.CommandNotFoundException
      org.aesh.command.parser.CommandLineParserException
      org.aesh.command.validator.OptionValidatorException
      org.aesh.command.validator.CommandValidatorException
      IOException
    • print

      public void print(String msg)
      Specified by:
      print in interface org.aesh.command.invocation.CommandInvocation
    • println

      public void println(String msg)
      Specified by:
      println in interface org.aesh.command.invocation.CommandInvocation
    • printf

      public void printf(String format, Object... args)
    • print

      public void print(String msg, boolean paging)
      Specified by:
      print in interface org.aesh.command.invocation.CommandInvocation
    • println

      public void println(String msg, boolean paging)
      Specified by:
      println in interface org.aesh.command.invocation.CommandInvocation
    • getContext

      public Context getContext()
    • getShellOutput

      public PrintStream getShellOutput()
    • getShellError

      public PrintStream getShellError()
    • getPasswordInteractively

      public String getPasswordInteractively(String prompt, String confirmPrompt) throws InterruptedException
      Throws:
      InterruptedException