if (cmd instanceof DelegatingImapCommandParser) {
((DelegatingImapCommandParser) cmd).setParserFactory(this);
}
if (cmd instanceof MessagingImapCommandParser) {
final MessagingImapCommandParser messagingImapCommandParser = (MessagingImapCommandParser) cmd;
messagingImapCommandParser.setStatusResponseFactory(statusResponseFactory);
}
}