public class MessageResultImpl extends Object implements MessageResult
MessageResult.FetchGroup, MessageResult.Header, MessageResult.MimePath| Constructor and Description |
|---|
MessageResultImpl(Message<?> message) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(MessageResult that) |
boolean |
equals(Object obj) |
Content |
getBody()
Gets the body of the message excluding headers.
|
Content |
getBody(MessageResult.MimePath path)
Gets the body of the given mime part.
|
javax.mail.Flags |
getFlags()
Return the
Flags |
Content |
getFullContent()
Gets the full message including headers and body.
|
Content |
getFullContent(MessageResult.MimePath path)
Gets the full content of the given mime part.
|
Headers |
getHeaders() |
Date |
getInternalDate()
IMAP defines this as the time when the message has arrived to the server
(by smtp).
|
Content |
getMimeBody(MessageResult.MimePath path)
Gets the body of the given mime part.
|
MimeDescriptor |
getMimeDescriptor() |
long |
getModSeq()
Return the modify-sequence number of the message.
|
long |
getSize()
Return the size in bytes
|
long |
getUid()
Return the uid of the message which the MessageResult belongs to
|
int |
hashCode() |
Iterator<MessageResult.Header> |
iterateHeaders(MessageResult.MimePath path)
Iterates the message headers for the given part in a multipart message.
|
Iterator<MessageResult.Header> |
iterateMimeHeaders(MessageResult.MimePath path)
Iterates the MIME headers for the given part in a multipart message.
|
void |
setBodyContent(MessageResult.MimePath path,
Content content) |
void |
setFullContent(MessageResult.MimePath path,
Content content) |
void |
setHeaders(MessageResult.MimePath path,
Iterator<MessageResult.Header> headers) |
void |
setMimeBodyContent(MessageResult.MimePath path,
Content content) |
void |
setMimeHeaders(MessageResult.MimePath path,
Iterator<MessageResult.Header> headers) |
String |
toString()
Renders suitably for logging.
|
public MessageResultImpl(Message<?> message) throws IOException
IOExceptionpublic long getUid()
MessageMetaDatagetUid in interface MessageMetaDataMessageMetaData.getUid()public Date getInternalDate()
MessageMetaDataIMAP defines this as the time when the message has arrived to the server (by smtp). Clients are also allowed to set the internalDate on append.
getInternalDate in interface MessageMetaDataMessageMetaData.getInternalDate()public javax.mail.Flags getFlags()
MessageMetaDataFlagsgetFlags in interface MessageMetaDataMessageMetaData.getFlags()public long getSize()
MessageMetaDatagetSize in interface MessageMetaDataMessageMetaData.getSize()public int compareTo(MessageResult that)
compareTo in interface Comparable<MessageResult>Comparable.compareTo(java.lang.Object)public final Content getFullContent() throws IOException
MessageResultgetFullContent in interface MessageResultContent, or or null if
MessageResult.FetchGroup.FULL_CONTENT has not been included in the
resultsIOExceptionMessageResult.getFullContent()public final Content getBody() throws IOException
MessageResultgetBody in interface MessageResultContent, or or null if
MessageResult.FetchGroup.FULL_CONTENT has not been included in the
resultsIOExceptionMessageResult.getBody()public String toString()
public Content getBody(MessageResult.MimePath path) throws MailboxException
MessageResultgetBody in interface MessageResultpath - describes the partContent, or null when
MessageResult.FetchGroup.content() did not been include the given
index and when the mime part cannot be foundMailboxExceptionMessageResult.getBody(org.apache.james.mailbox.model.MessageResult.MimePath)public Content getMimeBody(MessageResult.MimePath path) throws MailboxException
MessageResultgetMimeBody in interface MessageResultpath - describes the partContent, or null when
MessageResult.FetchGroup.content() did not been include the given
index and when the mime part cannot be foundMailboxExceptionMessageResult.getMimeBody(org.apache.james.mailbox.model.MessageResult.MimePath)public Content getFullContent(MessageResult.MimePath path) throws MailboxException
MessageResultgetFullContent in interface MessageResultpath - describes the partContent, or null when
MessageResult.FetchGroup.content() did not been include the given
index and when the mime part cannot be foundMailboxExceptionMessageResult.getFullContent(org.apache.james.mailbox.model.MessageResult.MimePath)public Iterator<MessageResult.Header> iterateHeaders(MessageResult.MimePath path) throws MailboxException
MessageResultiterateHeaders in interface MessageResultpath - describing the part's position within a multipart messageHeader Iterator, or null when
MessageResult.FetchGroup.content() does not include the index and
when the mime part cannot be foundMailboxExceptionMessageResult.iterateHeaders(org.apache.james.mailbox.model.MessageResult.MimePath)public Iterator<MessageResult.Header> iterateMimeHeaders(MessageResult.MimePath path) throws MailboxException
MessageResultiterateMimeHeaders in interface MessageResultpath - describing the part's position within a multipart messageHeader Iterator, or null when
MessageResult.FetchGroup.content() does not include the index and
when the mime part cannot be foundMailboxExceptionMessageResult.iterateMimeHeaders(org.apache.james.mailbox.model.MessageResult.MimePath)public void setBodyContent(MessageResult.MimePath path, Content content)
public void setMimeBodyContent(MessageResult.MimePath path, Content content)
public void setFullContent(MessageResult.MimePath path, Content content)
public void setHeaders(MessageResult.MimePath path, Iterator<MessageResult.Header> headers)
public void setMimeHeaders(MessageResult.MimePath path, Iterator<MessageResult.Header> headers)
public MimeDescriptor getMimeDescriptor() throws MailboxException
getMimeDescriptor in interface MessageResultMailboxExceptionMessageResult.getMimeDescriptor()public long getModSeq()
MessageMetaDatagetModSeq in interface MessageMetaDataMessageMetaData.getModSeq()public Headers getHeaders() throws MailboxException
getHeaders in interface MessageResultMailboxExceptionCopyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.