Class QuotaRootCommand
java.lang.Object
com.icegreen.greenmail.imap.commands.QuotaCommand
com.icegreen.greenmail.imap.commands.QuotaRootCommand
- All Implemented Interfaces:
ImapCommand,ImapConstants
Implements IMAP Quota Extension.
Supports MESSAGES and STORAGE.
See rfc2087
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Loggerstatic final Stringprotected CommandParserFields inherited from interface com.icegreen.greenmail.imap.ImapConstants
BAD, BYE, HIERARCHY_DELIMITER, HIERARCHY_DELIMITER_CHAR, INBOX_NAME, MESSAGES, NAMESPACE_PREFIX, NAMESPACE_PREFIX_CHAR, NO, OK, SP, STORAGE, UNTAGGED, USER_NAMESPACE, VERSION -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoProcess(ImapRequestLineReader request, ImapResponse response, ImapSession session) This is the method overridden by specific command implementations to perform commend-specific processing.protected final StringProvides the syntax for the command arguments if any.protected StringProvides a message which describes the expected format and arguments for this command.protected MailFoldergetMailbox(String mailboxName, ImapSession session, boolean mustExist) final StringgetName()voidprocess(ImapRequestLineReader request, ImapResponse response, ImapSession session) Template methods for handling command processing.booleanvalidForState(ImapSessionState state) Check that the state isImapSessionState.AUTHENTICATEDorImapSessionState.SELECTEDMethods inherited from class com.icegreen.greenmail.imap.commands.QuotaCommand
appendQuota, appendQuotaRootName
-
Field Details
-
NAME
- See Also:
-
log
protected final org.slf4j.Logger log -
parser
-
-
Method Details
-
doProcess
protected void doProcess(ImapRequestLineReader request, ImapResponse response, ImapSession session) throws ProtocolException, FolderException, AuthorizationException This is the method overridden by specific command implementations to perform commend-specific processing.- Overrides:
doProcessin classQuotaCommand- Parameters:
request- The client requestresponse- The server responsesession- The current client session- Throws:
ProtocolExceptionFolderExceptionAuthorizationException
-
validForState
Check that the state isImapSessionState.AUTHENTICATEDorImapSessionState.SELECTED- Specified by:
validForStatein interfaceImapCommand- Parameters:
state- The currentstateof theImapSession- Returns:
trueif the command is valid in this state.- See Also:
-
process
Template methods for handling command processing. This method reads argument values (validating them), and checks the request for correctness. If correct, the command processing is delegated to the specific command implementation.- Specified by:
processin interfaceImapCommand- Parameters:
request- The current client requestresponse- The current server responsesession- The current session- See Also:
-
getExpectedMessage
Provides a message which describes the expected format and arguments for this command. This is used to provide user feedback when a command request is malformed.- Returns:
- A message describing the command protocol format.
-
getArgSyntax
Provides the syntax for the command arguments if any. This value is used to provide user feedback in the case of a malformed request.For commands which do not allow any arguments,
nullshould be returned.- Returns:
- The syntax for the command arguments, or
nullfor commands without arguments.
-
getMailbox
protected MailFolder getMailbox(String mailboxName, ImapSession session, boolean mustExist) throws FolderException - Throws:
FolderException
-
getParser
-
getName
- Specified by:
getNamein interfaceImapCommand- Returns:
- the name of the command, as specified in rfc2060.
-