Class CLICommandInterface

java.lang.Object
org.jpos.q2.CLICommandInterface

public class CLICommandInterface extends Object
Dispatches CLI command lines to the appropriate CLICommand implementation.
  • Constructor Details

    • CLICommandInterface

      Creates a CLICommandInterface for the given context.
      Parameters:
      ctx - the CLI context
  • Method Details

    • getPrefixes

      public List<String> getPrefixes()
      Returns the list of registered command prefixes.
      Returns:
      command prefix list
    • addPrefix

      public void addPrefix(String prefix)
      Registers a command prefix.
      Parameters:
      prefix - the prefix to add
    • execCommand

      public void execCommand(String line) throws IOException
      Executes the given command line.
      Parameters:
      line - the full command line
      Throws:
      IOException - on I/O failure
    • parseCommand

      public String[] parseCommand(String line) throws IOException
      Parses a command line into tokens.
      Parameters:
      line - the full command line
      Returns:
      tokens: [prefix, command, args...]
      Throws:
      IOException - on I/O failure