Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.forum.mail
Class POP3Message

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

public class POP3Message
extends java.lang.Object
implements InboundMessage

Implementation of InboundMessage for POP3 protocol. Instances of this class actually hold all the message data in memory, sinces the vagaries of POP3 prevent us from lazily retrieving data from the server.


Constructor Summary
POP3Message(java.lang.String subject, java.lang.String body, java.util.List headers, javax.mail.Address[] from, java.util.List attachments)
          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

POP3Message

public POP3Message(java.lang.String subject,
                   java.lang.String body,
                   java.util.List headers,
                   javax.mail.Address[] from,
                   java.util.List attachments)
            throws java.io.IOException
Sole constructor

Parameters:
subject - the subject text of the message.
body - the body text of the message.
headers - the message headers of the original message.
from - the address(es) of the sender.
Throws:
java.io.IOException
Method Detail

getBody

public java.lang.String getBody()
                         throws javax.mail.MessagingException,
                                java.io.IOException
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.

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.