java.lang.Object
jakarta.mail.Message
jakarta.mail.internet.MimeMessage
org.eclipse.angus.mail.imap.IMAPMessage
org.eclipse.angus.mail.gimap.GmailMessage
- All Implemented Interfaces:
MimePart
,Part
,ReadableMime
A Gmail message. Adds methods to access Gmail-specific per-message data.
- Since:
- JavaMail 1.4.6
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.angus.mail.imap.IMAPMessage
IMAPMessage.FetchProfileCondition
Nested classes/interfaces inherited from class jakarta.mail.internet.MimeMessage
MimeMessage.RecipientType
-
Field Summary
Fields inherited from class org.eclipse.angus.mail.imap.IMAPMessage
bs, envelope, items, sectionId
Fields inherited from class jakarta.mail.internet.MimeMessage
cachedContent, content, contentStream, dh, flags, headers, modified, saved
Fields inherited from interface jakarta.mail.Part
ATTACHMENT, INLINE
-
Constructor Summary
ModifierConstructorDescriptionprotected
GmailMessage
(Session session) Constructor, for use by IMAPNestedMessage.protected
GmailMessage
(IMAPFolder folder, int msgnum) Constructor. -
Method Summary
Methods inherited from class org.eclipse.angus.mail.imap.IMAPMessage
addFrom, addHeader, addHeaderLine, addRecipients, checkExpunged, fetchItem, forceCheckExpunged, getAllHeaderLines, getAllHeaders, getContentID, getContentLanguage, getContentMD5, getContentStream, getContentType, getDataHandler, getDescription, getDisposition, getEncoding, getFetchBlockSize, getFileName, getFlags, getFrom, getHeader, getHeader, getInReplyTo, getItem, getLineCount, getMatchingHeaderLines, getMatchingHeaders, getMessageCacheLock, getMessageID, getMimeStream, getModSeq, getNonMatchingHeaderLines, getNonMatchingHeaders, getPeek, getProtocol, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSequenceNumber, getSize, getSizeLong, getSubject, getUID, handleExtensionFetchItems, handleFetchItem, ignoreBodyStructureSize, invalidateHeaders, isREV1, isSet, removeHeader, setContentID, setContentLanguage, setContentMD5, setDataHandler, setDescription, setDisposition, setExpunged, setFileName, setFlags, setFrom, setHeader, setMessageNumber, setPeek, setRecipients, setReplyTo, setSender, setSentDate, setSubject, setUID, writeTo
Methods inherited from class jakarta.mail.internet.MimeMessage
addRecipients, createInternetHeaders, createMimeMessage, getAllRecipients, getContent, getInputStream, getRawInputStream, isMimeType, parse, reply, reply, saveChanges, setContent, setContent, setDescription, setFrom, setFrom, setRecipients, setSubject, setText, setText, setText, updateHeaders, updateMessageID, writeTo
Methods inherited from class jakarta.mail.Message
addRecipient, getFolder, getMessageNumber, getSession, isExpunged, match, setFlag, setRecipient
-
Constructor Details
-
GmailMessage
Constructor.- Parameters:
folder
- the containing foldermsgnum
- the message sequence number
-
GmailMessage
Constructor, for use by IMAPNestedMessage.- Parameters:
session
- the Session
-
-
Method Details
-
getMsgId
Return the Gmail unique message ID.- Returns:
- the message ID
- Throws:
MessagingException
- for failures
-
getThrId
Return the Gmail unique thread ID.- Returns:
- the thread ID
- Throws:
MessagingException
- for failures
-
getLabels
Return the Gmail labels associated with this message.- Returns:
- array of labels, or empty array if none
- Throws:
MessagingException
- for failures
-
setLabels
Set/Unset the given labels on this message.- Parameters:
labels
- the labels to add or removeset
- true to add labels, false to remove- Throws:
MessagingException
- for failures- Since:
- JavaMail 1.5.5
-
clearCachedLabels
public void clearCachedLabels()Clear any cached labels for this message. The Gmail labels for a messge will be cached when first accessed using either the fetch method or the getLabels method. Gmail provides no notification when the labels have been changed by another application so applications may need to clear the cache if accessing the labels for a message more than once while the Folder is open.- Since:
- JavaMail 1.5.6
-