com.sun.mail.gimap

## Class GmailMessage

- java.lang.Object
- - javax.mail.Message
  - - javax.mail.internet.MimeMessage
    - - com.sun.mail.imap.IMAPMessage
      - - com.sun.mail.gimap.GmailMessage

- All Implemented Interfaces:
    ReadableMime, MimePart, Part

      public class GmailMessage
      extends IMAPMessage

  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 com.sun.mail.imap.IMAPMessage

      `IMAPMessage.FetchProfileCondition`

    - ### Nested classes/interfaces inherited from class javax.mail.internet.MimeMessage

      `MimeMessage.RecipientType`

  - ### Field Summary

    - ### Fields inherited from class com.sun.mail.imap.IMAPMessage

      `bs, envelope, items, sectionId`

    - ### Fields inherited from class javax.mail.internet.MimeMessage

      `content, contentStream, dh, flags, headers, modified, saved`

    - ### Fields inherited from class javax.mail.Message

      `expunged, folder, msgnum, session`

    - ### Fields inherited from interface javax.mail.Part

      `ATTACHMENT, INLINE`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `GmailMessage(IMAPFolder folder, int msgnum)` Constructor.
    `protected` | `GmailMessage(Session session)` Constructor, for use by IMAPNestedMessage.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String[]` | `getLabels()` Return the Gmail labels assocaited with this message.
    `long` | `getMsgId()` Return the Gmail unique message ID.
    `long` | `getThrId()` Return the Gmail unique thread ID.

    - ### Methods inherited from class com.sun.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, getNonMatchingHeaderLines, getNonMatchingHeaders, getPeek, getProtocol, getReceivedDate, getRecipients, getReplyTo, getSender, getSentDate, getSequenceNumber, getSize, 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 javax.mail.internet.MimeMessage

      `addRecipients, createInternetHeaders, createMimeMessage, getAllRecipients, getContent, getInputStream, getRawInputStream, isMimeType, parse, reply, saveChanges, setContent, setContent, setDescription, setFrom, setRecipients, setSubject, setText, setText, setText, updateHeaders, updateMessageID, writeTo`

    - ### Methods inherited from class javax.mail.Message

      `addRecipient, getFolder, getMessageNumber, isExpunged, match, setFlag, setRecipient`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### GmailMessage

          protected GmailMessage(IMAPFolder folder,
                      int msgnum)

      Constructor.

    - #### GmailMessage

          protected GmailMessage(Session session)

      Constructor, for use by IMAPNestedMessage.

  - ### Method Detail

    - #### getMsgId

          public long getMsgId()
                        throws MessagingException

      Return the Gmail unique message ID.
      Throws:
        `MessagingException`

    - #### getThrId

          public long getThrId()
                        throws MessagingException

      Return the Gmail unique thread ID.
      Throws:
        `MessagingException`

    - #### getLabels

          public String[] getLabels()
                             throws MessagingException

      Return the Gmail labels assocaited with this message.
      Throws:
        `MessagingException`

Copyright © 2013 Oracle. All Rights Reserved.