public class ImapResponse extends Object implements ImapConstants
BAD, BYE, CAPABILITIES, HIERARCHY_DELIMITER, HIERARCHY_DELIMITER_CHAR, INBOX_NAME, MESSAGES, NAMESPACE_PREFIX, NAMESPACE_PREFIX_CHAR, NO, OK, SP, STORAGE, UNTAGGED, USER_NAMESPACE, VERSION
Constructor and Description |
---|
ImapResponse(OutputStream output) |
Modifier and Type | Method and Description |
---|---|
void |
badResponse(String message)
Writes a standard untagged BAD response, together with a descriptive message.
|
void |
byeResponse(String message) |
void |
commandComplete(ImapCommand command)
Writes a standard tagged OK response on completion of a command.
|
void |
commandComplete(ImapCommand command,
String responseCode)
Writes a standard tagged OK response on completion of a command,
with a response code (eg READ-WRITE)
Response is writen as:
|
void |
commandError(String message)
Writes a standard BAD response on command error, together with a
descriptive message.
|
void |
commandFailed(ImapCommand command,
String reason)
Writes a standard NO response on command failure, together with a
descriptive message.
|
void |
commandFailed(ImapCommand command,
String responseCode,
String reason)
Writes a standard NO response on command failure, together with a
descriptive message.
|
void |
commandResponse(ImapCommand command,
String message) |
void |
existsResponse(int count) |
void |
expungeResponse(int msn) |
void |
fetchResponse(int msn,
String msgData) |
void |
flagsResponse(javax.mail.Flags flags) |
void |
okResponse(String responseCode,
String message)
Writes an untagged OK response, with the supplied response code,
and an optional message.
|
void |
permanentFlagsResponse(javax.mail.Flags flags) |
void |
recentResponse(int count) |
void |
setTag(String tag) |
void |
taggedResponse(String message)
Writes the message provided to the client, prepended with the
request tag.
|
void |
untaggedResponse(String message)
Writes the message provided to the client, prepended with the
untagged marker "*".
|
public ImapResponse(OutputStream output)
public void setTag(String tag)
public void commandComplete(ImapCommand command)
a01 OK COMMAND_NAME completed.
command
- The ImapCommand which was completed.public void commandComplete(ImapCommand command, String responseCode)
a01 OK [responseCode] COMMAND_NAME completed.
command
- The ImapCommand which was completed.responseCode
- A string response code to send to the client.public void commandFailed(ImapCommand command, String reason)
a01 NO COMMAND_NAME failed.
command
- The ImapCommand which failed.reason
- A message describing why the command failed.public void commandFailed(ImapCommand command, String responseCode, String reason)
a01 NO [responseCode] COMMAND_NAME failed.
command
- The ImapCommand which failed.responseCode
- The Imap response code to send.reason
- A message describing why the command failed.public void commandError(String message)
a01 BAD
message
- The descriptive error message.public void badResponse(String message)
public void okResponse(String responseCode, String message)
responseCode
- The response code, included in [].message
- The message to follow the []public void flagsResponse(javax.mail.Flags flags)
public void existsResponse(int count)
public void recentResponse(int count)
public void expungeResponse(int msn)
public void fetchResponse(int msn, String msgData)
public void commandResponse(ImapCommand command, String message)
public void taggedResponse(String message)
message
- The message to write to the client.public void untaggedResponse(String message)
message
- The message to write to the client.public void byeResponse(String message)
public void permanentFlagsResponse(javax.mail.Flags flags)
Copyright © 2006–2018 Icegreen Technologies. All rights reserved.