Package org.jboss.as.cli.operation.impl
Class DefaultOperationRequestParser
- java.lang.Object
-
- org.jboss.as.cli.operation.impl.DefaultOperationRequestParser
-
- All Implemented Interfaces:
CommandLineParser
public class DefaultOperationRequestParser extends Object implements CommandLineParser
Default implementation of CommandParser which expects the following command format: [node-type=node-name (, node-type=node-name)*] : operation-name ['(' name=value (, name=value)* ')' ] the whitespaces are insignificant. E.g. profile=production,subsystem=threads,bounded-queue-thread-pool=pool1:write-core-threads(count=0, per-cpu=20) Each node-type, node-name, operation-name and the argument name as strings are checked to be valid identifiers, i.e. the Character.isJavaIdentifierStart(c) should return true for the first character and the rest should satisfy (Character.isJavaIdentifierPart(c) || c == '-') This implementation is thread-safe. The same instance of this class can be re-used multiple times and can be accessed from multiple threads concurrently w/o synchronization.- Author:
- Alexey Loubyansky
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.as.cli.operation.CommandLineParser
CommandLineParser.CallbackHandler
-
-
Field Summary
Fields Modifier and Type Field Description static CommandLineParserINSTANCE
-
Constructor Summary
Constructors Constructor Description DefaultOperationRequestParser()DefaultOperationRequestParser(CommandContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidparse(String operationRequest, CommandLineParser.CallbackHandler handler)
-
-
-
Field Detail
-
INSTANCE
public static final CommandLineParser INSTANCE
-
-
Constructor Detail
-
DefaultOperationRequestParser
public DefaultOperationRequestParser()
-
DefaultOperationRequestParser
public DefaultOperationRequestParser(CommandContext ctx)
-
-
Method Detail
-
parse
public void parse(String operationRequest, CommandLineParser.CallbackHandler handler) throws OperationFormatException
- Specified by:
parsein interfaceCommandLineParser- Throws:
OperationFormatException
-
-