use of org.apache.nifi.toolkit.cli.impl.command.misc.Exit in project nifi by apache.
the class CommandFactory method createTopLevelCommands.
public static Map<String, Command> createTopLevelCommands(final Context context) {
final List<Command> commandList = new ArrayList<>();
commandList.add(new Help());
commandList.add(new Exit());
final Map<String, Command> commandMap = new TreeMap<>();
commandList.stream().forEach(cmd -> {
cmd.initialize(context);
commandMap.put(cmd.getName(), cmd);
});
return Collections.unmodifiableMap(commandMap);
}