public class MailEventImpl extends AbstractEvent implements MailEvent
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
content
The string content of the message if the content is a string.
|
protected javax.mail.Message |
message
The message for which the event has been created.
|
protected java.util.Date |
receivedDate
The date the message has been received (if it has been received and not
been sent or stored as draft).
|
protected java.lang.String[] |
recipients
All the recipients of the message.
|
protected java.lang.String[] |
senders
The senders of the message.
|
protected java.util.Date |
sentDate
The date the message has been sent (if it has been sent and not been
received or stored as draft).
|
protected java.lang.String |
subject
The subject of the message.
|
creationTime, eventType, id, ID_COUNT, managerURI, sourceID, sourceType| Constructor and Description |
|---|
MailEventImpl(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID,
javax.mail.Message message)
Creates a new event for the designated message.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String[] |
getAllRecipients()
Gets the recipients (mail addresses) of the mail that caused this event.
|
javax.mail.Message |
getMessage()
Gets the message (mail) that caused this event.
|
java.util.Date |
getReceivedDate()
Gets the date the mail that caused this event has been received.
|
java.lang.String[] |
getSenders()
Gets the senders (mail addresses) of the mail that caused this event.
|
java.util.Date |
getSentDate()
Gets the date the mail that caused this event has been sent.
|
java.lang.String |
getStringContent()
Gets the string content of the mail that caused this event.
|
java.lang.String |
getSubject()
Gets the subject of the mail that caused this event.
|
getCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetCreationTime, getEventManager, getEventType, getID, getSourceID, getSourceTypeprotected final javax.mail.Message message
protected final java.lang.String[] recipients
protected final java.lang.String[] senders
protected final java.lang.String subject
protected final java.util.Date receivedDate
protected final java.util.Date sentDate
protected final java.lang.String content
null.public MailEventImpl(java.net.URI[] managerURI,
java.lang.String eventType,
java.lang.String sourceType,
java.lang.String sourceID,
javax.mail.Message message)
throws javax.mail.MessagingException,
java.io.IOException
managerURI - The URIs of the service (event manager) creating the
event.eventType - The type of the event.sourceType - The type of the source of this event.sourceID - The ID of the source of this event.message - The message of the event.javax.mail.MessagingException - If retrieving the required data from the message
fails, a MessagingException will be thrown.java.io.IOException - Retrieving the (complex) content of the message may
thrown an IOException.public java.lang.String[] getAllRecipients()
getAllRecipients in interface MailEventpublic java.lang.String[] getSenders()
MailEventgetSenders in interface MailEventpublic java.lang.String getSubject()
MailEventnull will be returned.getSubject in interface MailEventpublic java.util.Date getReceivedDate()
MailEventnull will be returned.getReceivedDate in interface MailEventpublic java.util.Date getSentDate()
MailEventnull will
be returned.getSentDate in interface MailEventpublic java.lang.String getStringContent()
MailEventnull will be returned.getStringContent in interface MailEventpublic javax.mail.Message getMessage()
MailEventgetMessage in interface MailEvent