Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail
Class IMAPMessage

java.lang.Object
  extended by com.jivesoftware.forum.mail.IMAPMessage
All Implemented Interfaces:
InboundMessage

public class IMAPMessage
extends java.lang.Object
implements InboundMessage

Implementation of InboundMessage for IMAP protocol. This implementation delegates to an underlying Message object in order to lazily read data from the server. Instances of this class are accessed by calling code through an EmailBatch, which allows the closing of server resources to be deferred. Once an IMAPMessage's enclosing EmailBatch is closed, calls to any methods of this object are likely to fail with an exception toss.


Constructor Summary
IMAPMessage(javax.mail.Message original)
          Sole constructor
 
Method Summary
 java.util.Iterator getAttachments()
          Returns the attachments as an Iterator of AttachmentData.
 java.lang.String getBody()
          Returns the body text of the message.
 javax.mail.Address[] getFrom()
          Returns the sender addresses.
 java.lang.String[] getHeader(java.lang.String name)
          Returns the header values corresponding to the supplied header name.
 java.util.Iterator getHeaders()
          Returns the headers sent with the message as an Iterator of strings.
 java.lang.String getSubject()
          Returns the subject text of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMAPMessage

public IMAPMessage(javax.mail.Message original)
Sole constructor

Parameters:
original - the original message
Method Detail

getBody

public java.lang.String getBody()
                         throws javax.mail.MessagingException,
                                java.io.IOException,
                                EmailMonitorException
Description copied from interface: InboundMessage
Returns the body text of the message.

Specified by:
getBody in interface InboundMessage
Returns:
the body text of the message.
Throws:
javax.mail.MessagingException - if a server communication error occurs.
java.io.IOException - if a server communication error occurs.
EmailMonitorException - if the body is an unhandled content type.

getAttachments

public java.util.Iterator getAttachments()
                                  throws javax.mail.MessagingException,
                                         java.io.IOException
Description copied from interface: InboundMessage
Returns the attachments as an Iterator of AttachmentData.

Specified by:
getAttachments in interface InboundMessage
Returns:
the attachments as an Iterator of AttachmentData.
Throws:
javax.mail.MessagingException - if a server communication error occurs.
java.io.IOException - if a server communication error occurs.

getHeaders

public java.util.Iterator getHeaders()
                              throws javax.mail.MessagingException
Description copied from interface: InboundMessage
Returns the headers sent with the message as an Iterator of strings.

Specified by:
getHeaders in interface InboundMessage
Returns:
the headers sent with the message as an Iterator of strings.
Throws:
javax.mail.MessagingException - if a server communication error occurs.

getFrom

public javax.mail.Address[] getFrom()
                             throws javax.mail.MessagingException
Description copied from interface: InboundMessage
Returns the sender addresses.

Specified by:
getFrom in interface InboundMessage
Returns:
the sender addresses.
Throws:
javax.mail.MessagingException - if a server communication error occurs.

getSubject

public java.lang.String getSubject()
                            throws javax.mail.MessagingException
Description copied from interface: InboundMessage
Returns the subject text of the message.

Specified by:
getSubject in interface InboundMessage
Returns:
the subject text of the message.
Throws:
javax.mail.MessagingException - if a server communication error occurs.

getHeader

public java.lang.String[] getHeader(java.lang.String name)
                             throws javax.mail.MessagingException
Description copied from interface: InboundMessage
Returns the header values corresponding to the supplied header name.

Specified by:
getHeader in interface InboundMessage
Parameters:
name - the name to supply values for. *
Returns:
the header values corresponding to the supplied header name.
Throws:
javax.mail.MessagingException - if a server communication error occurs.

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.