Class CLICommandInterface
java.lang.Object
org.jpos.q2.CLICommandInterface
Dispatches CLI command lines to the appropriate
CLICommand implementation.-
Constructor Summary
ConstructorsConstructorDescriptionCreates a CLICommandInterface for the given context. -
Method Summary
Modifier and TypeMethodDescriptionvoidRegisters a command prefix.voidexecCommand(String line) Executes the given command line.Returns the list of registered command prefixes.String[]parseCommand(String line) Parses a command line into tokens.
-
Constructor Details
-
CLICommandInterface
Creates a CLICommandInterface for the given context.- Parameters:
ctx- the CLI context
-
-
Method Details
-
getPrefixes
Returns the list of registered command prefixes.- Returns:
- command prefix list
-
addPrefix
-
execCommand
Executes the given command line.- Parameters:
line- the full command line- Throws:
IOException- on I/O failure
-
parseCommand
Parses a command line into tokens.- Parameters:
line- the full command line- Returns:
- tokens: [prefix, command, args...]
- Throws:
IOException- on I/O failure
-