private ImapMessage decodeCommandNamed(final ImapRequestLineReader request, final String tag, String commandName, final ImapSession session) {
ImapMessage message;
if (session.getLog().isDebugEnabled()) {
session.getLog().debug("Got <command>: " + commandName);
}
final ImapCommandParser command = imapCommands.getParser(commandName);
if (command == null) {
if (session.getLog().isInfoEnabled()) {
session.getLog().info("Missing command implementation for commmand " + commandName);
}
message = unknownCommand(tag, session);
} else {
message = command.parse(request, tag, session);
session.setAttribute(INVALID_COMMAND_COUNT, 0);
}
return message;
}