本文整理匯總了Java中com.icegreen.greenmail.imap.commands.ImapCommand類的典型用法代碼示例。如果您正苦於以下問題:Java ImapCommand類的具體用法?Java ImapCommand怎麽用?Java ImapCommand使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
ImapCommand類屬於com.icegreen.greenmail.imap.commands包,在下文中一共展示了ImapCommand類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: commandFailed
import com.icegreen.greenmail.imap.commands.ImapCommand; //導入依賴的package包/類
/**
* 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();
}
示例2: commandResponse
import com.icegreen.greenmail.imap.commands.ImapCommand; //導入依賴的package包/類
public void commandResponse(ImapCommand command, String message) {
untagged();
commandName(command);
message(message);
end();
}
示例3: commandName
import com.icegreen.greenmail.imap.commands.ImapCommand; //導入依賴的package包/類
private void commandName(ImapCommand command) {
String name = command.getName();
print(SP);
print(name);
}
示例4: commandName
import com.icegreen.greenmail.imap.commands.ImapCommand; //導入依賴的package包/類
private void commandName(ImapCommand command) {
String name = command.getName();
writer.print(SP);
writer.print(name);
}
示例5: commandComplete
import com.icegreen.greenmail.imap.commands.ImapCommand; //導入依賴的package包/類
/**
* 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();
}