use of org.apache.nifi.toolkit.cli.api.Command in project nifi by apache.
the class CLIMain method runSingleCommand.
/**
* Handles running a single command and exiting, non-interactive mode.
*
* @param args the args passed in from the command line
*/
private static int runSingleCommand(final String[] args) {
final Context context = createContext(System.out, false);
final Map<String, Command> topLevelCommands = CommandFactory.createTopLevelCommands(context);
final Map<String, CommandGroup> commandGroups = CommandFactory.createCommandGroups(context);
final CommandProcessor commandProcessor = new CommandProcessor(topLevelCommands, commandGroups, context);
return commandProcessor.process(args);
}
Aggregations