public abstract class ExchangeSession.Message extends Object implements Comparable<ExchangeSession.Message>
Modifier and Type | Field and Description |
---|---|
boolean |
answered
Message flag: answered.
|
String |
contentClass
Message content class.
|
String |
date
Message date (urn:schemas:mailheader:date).
|
boolean |
deleted
Message flag: deleted.
|
boolean |
draft
Message flag: draft.
|
boolean |
flagged
Message flag: flagged.
|
boolean |
forwarded
Message flag: fowarded.
|
long |
imapUid
Message IMAP uid, unique in folder (x0e230003).
|
boolean |
junk
Message flag: junk.
|
String |
keywords
Message keywords (categories).
|
ExchangeSession.MessageList |
messageList
enclosing message list
|
String |
messageUrl
Message url.
|
protected byte[] |
mimeContent
Unparsed message content.
|
protected javax.mail.internet.MimeMessage |
mimeMessage
Message content parsed in a MIME message.
|
String |
permanentUrl
Message permanent url (does not change on message move).
|
boolean |
read
Message flag: read.
|
boolean |
recent
Message flag: recent.
|
int |
size
MAPI message size.
|
String |
uid
Message uid.
|
Constructor and Description |
---|
Message() |
Modifier and Type | Method and Description |
---|---|
String |
addFlag(String flag) |
int |
compareTo(ExchangeSession.Message message)
Comparator to sort messages by IMAP uid
|
void |
delete()
Delete message.
|
void |
dropMimeMessage()
Drop mime message to avoid keeping message content in memory,
keep a single message in MessageList cache to handle chunked fetch.
|
boolean |
equals(Object message)
Override equals, compare IMAP uids
|
String |
getImapFlags()
Return message flags in IMAP format.
|
long |
getImapUid()
IMAP uid , unique in folder (x0e230003)
|
Enumeration<?> |
getMatchingHeaderLines(String[] headerNames) |
Enumeration<?> |
getMatchingHeaderLinesFromHeaders(String[] headerNames) |
protected abstract InputStream |
getMimeHeaders() |
javax.mail.internet.MimeMessage |
getMimeMessage()
Get message content as a Mime message.
|
int |
getMimeMessageSize()
Get message body size.
|
abstract String |
getPermanentId()
Get permanent message id.
|
InputStream |
getRawInputStream()
Get message body input stream.
|
String |
getUid()
Exchange uid.
|
int |
hashCode()
Override hashCode, return imapUid hashcode.
|
boolean |
isLoaded() |
void |
loadMimeMessage()
Load message content in a Mime message
|
void |
markRead()
Mark message as read.
|
void |
moveToTrash()
Move message to trash, mark message read.
|
String |
removeFlag(String flag) |
String |
setFlags(HashSet<String> flags) |
void |
setImapUid(long imapUid)
Set IMAP uid.
|
public ExchangeSession.MessageList messageList
public String messageUrl
public String permanentUrl
public String uid
public String contentClass
public String keywords
public long imapUid
public int size
public String date
public boolean read
public boolean deleted
public boolean junk
public boolean flagged
public boolean recent
public boolean draft
public boolean answered
public boolean forwarded
protected byte[] mimeContent
protected javax.mail.internet.MimeMessage mimeMessage
public abstract String getPermanentId()
public long getImapUid()
public void setImapUid(long imapUid)
imapUid
- new uidpublic String getUid()
public String getImapFlags()
public void loadMimeMessage() throws IOException, javax.mail.MessagingException
IOException
- on errorjavax.mail.MessagingException
- on errorpublic javax.mail.internet.MimeMessage getMimeMessage() throws IOException, javax.mail.MessagingException
IOException
- on errorjavax.mail.MessagingException
- on errorpublic Enumeration<?> getMatchingHeaderLinesFromHeaders(String[] headerNames) throws javax.mail.MessagingException
javax.mail.MessagingException
public Enumeration<?> getMatchingHeaderLines(String[] headerNames) throws javax.mail.MessagingException, IOException
javax.mail.MessagingException
IOException
protected abstract InputStream getMimeHeaders()
public int getMimeMessageSize() throws IOException, javax.mail.MessagingException
IOException
- on errorjavax.mail.MessagingException
- on errorpublic InputStream getRawInputStream() throws IOException, javax.mail.MessagingException
IOException
- on errorjavax.mail.MessagingException
- on errorpublic void dropMimeMessage()
public boolean isLoaded()
public void delete() throws IOException
IOException
- on errorpublic void moveToTrash() throws IOException
IOException
- on errorpublic void markRead() throws IOException
IOException
- on errorpublic int compareTo(ExchangeSession.Message message)
compareTo
in interface Comparable<ExchangeSession.Message>
message
- other messagepublic boolean equals(Object message)
public int hashCode()
Copyright © 2001–2024 MickaĆ«l Guessant. All rights reserved.