/** * Writes an untagged OK response, with the supplied response code, * and an optional message. * * @param responseCode The response code, included in []. * @param message The message to follow the [] */ public void okResponse(String responseCode, String message) { untagged(); message(OK); responseCode(responseCode); message(message); end(); }
/** * Writes the message provided to the client, prepended with the * request tag. * * @param message The message to write to the client. */ public void taggedResponse(String message) { tag(); message(message); end(); }
/** * Writes the message provided to the client, prepended with the * untagged marker "*". * * @param message The message to write to the client. */ public void untaggedResponse(String message) { untagged(); message(message); end(); }
/** * Writes a standard NO response on command failure, together with a * descriptive message. * Response is writen as: * <pre> a01 NO [responseCode] COMMAND_NAME failed. <reason></pre> * * @param command The ImapCommand which failed. * @param responseCode The Imap response code to send. * @param reason A message describing why the command failed. */ public void commandFailed(ImapCommand command, String responseCode, String reason) { tag(); message(NO); responseCode(responseCode); commandName(command); message("failed."); message(reason); end(); }
/** * Writes a standard tagged OK response on completion of a command, * with a response code (eg READ-WRITE) * Response is writen as: * <pre> a01 OK [responseCode] COMMAND_NAME completed.</pre> * * @param command The ImapCommand which was completed. * @param responseCode A string response code to send to the client. */ public void commandComplete(ImapCommand command, String responseCode) { tag(); message(OK); responseCode(responseCode); commandName(command); message("completed."); end(); }
public void commandResponse(ImapCommand command, String message) { untagged(); commandName(command); message(message); end(); }
public void permanentFlagsResponse(Flags flags) { untagged(); message(OK); responseCode("PERMANENTFLAGS " + MessageFlags.format(flags)); end(); } }