public interface ImapResponseComposer
Modifier and Type | Method and Description |
---|---|
ImapResponseComposer |
closeParen()
Write a ')'
|
ImapResponseComposer |
closeSquareBracket()
Write a '}'
|
ImapResponseComposer |
commandName(String name) |
ImapResponseComposer |
commandResponse(ImapCommand command,
String message)
Compose a response which contains the
ImapCommand to which the
response belongs |
ImapResponseComposer |
continuationResponse(String message)
Writes a continuation response.
|
ImapResponseComposer |
end()
Write a CRLF and flush the composer which will write the content of it to
the socket
|
ImapResponseComposer |
flags(javax.mail.Flags flags)
Compose flags to output using standard format.
|
ImapResponseComposer |
literal(Literal literal)
Compose a
Literal and write it to the socket. |
ImapResponseComposer |
mailbox(String mailboxName)
First encodes the given
mailboxName using
CharsetUtil.encodeModifiedUTF7(String) and then quotes the result
with quote(String) . |
ImapResponseComposer |
message(long number)
Write the message of type
Long |
ImapResponseComposer |
message(String message)
Write the message of type
String |
ImapResponseComposer |
nil()
Composes a
NIL . |
ImapResponseComposer |
openParen()
Write a '('
|
ImapResponseComposer |
openSquareBracket()
Write a '{'
|
ImapResponseComposer |
quote(String message)
Write a quoted message
|
ImapResponseComposer |
quoteUpperCaseAscii(String message)
Appends the given message after conversion to upper case.
|
ImapResponseComposer |
sequenceSet(IdRange[] ranges)
Write the given sequence-set
|
ImapResponseComposer |
skipNextSpace()
Tell the
ImapResponseComposer to skip the next written space |
ImapResponseComposer |
tag(String tag)
Write a tag
|
ImapResponseComposer |
taggedResponse(String message,
String tag)
Writes the message provided to the client, prepended with the request
tag.
|
ImapResponseComposer |
untagged()
Write a '*'
|
ImapResponseComposer |
untaggedNoResponse(String displayMessage,
String responseCode)
Writes an untagged NO response.
|
ImapResponseComposer |
untaggedResponse(String message)
Writes the message provided to the client, prepended with the untagged
marker "*".
|
ImapResponseComposer |
upperCaseAscii(String message)
Appends the given message after conversion to upper case.
|
ImapResponseComposer untaggedNoResponse(String displayMessage, String responseCode) throws IOException
displayMessage
- message for display, not nullresponseCode
- response code or null when there is no response codeIOException
ImapResponseComposer flags(javax.mail.Flags flags) throws IOException
flags
- Flags
, not nullIOException
ImapResponseComposer nil() throws IOException
NIL
.IOException
ImapResponseComposer commandResponse(ImapCommand command, String message) throws IOException
ImapCommand
to which the
response belongscommand
- message
- IOException
ImapResponseComposer taggedResponse(String message, String tag) throws IOException
message
- The message to write to the client.IOException
ImapResponseComposer untaggedResponse(String message) throws IOException
message
- The message to write to the client.IOException
ImapResponseComposer untagged() throws IOException
IOException
ImapResponseComposer commandName(String name) throws IOException
name
- IOException
ImapResponseComposer message(String message) throws IOException
String
message
- IOException
ImapResponseComposer message(long number) throws IOException
Long
number
- IOException
ImapResponseComposer mailbox(String mailboxName) throws IOException
mailboxName
using
CharsetUtil.encodeModifiedUTF7(String)
and then quotes the result
with quote(String)
.mailboxName
- IOException
ImapResponseComposer sequenceSet(IdRange[] ranges) throws IOException
ranges
- IOException
ImapResponseComposer end() throws IOException
IOException
ImapResponseComposer tag(String tag) throws IOException
tag
- IOException
ImapResponseComposer quote(String message) throws IOException
message
- IOException
ImapResponseComposer literal(Literal literal) throws IOException
Literal
and write it to the socket. Everything which
was buffered before will get written tooliteral
- IOException
ImapResponseComposer openParen() throws IOException
IOException
ImapResponseComposer closeParen() throws IOException
IOException
ImapResponseComposer upperCaseAscii(String message) throws IOException
message
- ASCII encoded, not nullIOException
ImapResponseComposer quoteUpperCaseAscii(String message) throws IOException
message
- ASCII encoded, not nullIOException
ImapResponseComposer skipNextSpace() throws IOException
ImapResponseComposer
to skip the next written spaceIOException
ImapResponseComposer continuationResponse(String message) throws IOException
message
- message for display, not nullIOException
ImapResponseComposer closeSquareBracket() throws IOException
IOException
ImapResponseComposer openSquareBracket() throws IOException
IOException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.