public void run() {
		while (true) {
			try {
				String[] nextCommand = input.readLine().split(" ");

				String commandName = nextCommand[0];
				String[] arguments = Arrays.copyOfRange(nextCommand, 1,
						nextCommand.length);

				SystemCommand<Facade> command = commands.get(commandName);

				if (command == null) {
					command = new UnknownSystemCommand<Facade>(facade,
							commandName);
					commands.put(commandName, command);
				}

				try {

					int minimumArguments = getCommandMinimumArguments(command);

					if (arguments == null
							|| arguments.length < minimumArguments)
						throw new SystemCommandException(
								"Invalid number of arguments for command ["
										+ commandName + "].");

					String message = command.processCommand(arguments);

					output.println(message);
					output.flush();
				} catch (SystemCommandException e) {
					error.println(e.getMessage());
					error.flush();
				}

			} catch (IOException e) {
				e.printStackTrace(error);
			}
		}
	}