for (Command command : request) {
String name = command.getCommandName();
try {
if (commandHandlers.containsKey(name)) {
CommandHandler handler = commandHandlers.get(name);
CommandResult result = handler.handleCommand(command);
response.addCommandResult(result);
} else {
// Use the "default" command handler if one is registered.
if (unknownCommandHandler != null) {
CommandResult result = unknownCommandHandler.handleCommand(command);