Clearspace API (1.10.16) Core Javadocs

com.jivesoftware.community.event
Class EmailEvent

java.lang.Object
  extended by com.jivesoftware.community.event.EmailEvent
All Implemented Interfaces:
JiveEvent

public class EmailEvent
extends java.lang.Object
implements JiveEvent

A class for EmailEvent events. This class will be passed to EmailListeners whenever an email event is fired and contains all the pertinent information to the event.


Field Summary
static int EMAIL_RECEIVED
          An email was received.
static int EMAIL_SENDING
          An email is about to be sent.
 
Constructor Summary
EmailEvent(int eventType, javax.mail.Message message, EmailMessage emailMessage, java.util.Map<java.lang.String,? extends java.lang.Object> params)
          Creates a new email event.
 
Method Summary
 java.util.Date getDate()
          Returns the date (as a Date object) that the event was created.
 EmailMessage getEmailMessage()
          Returns the Clearspace email message that this email wraps.
 int getEventType()
          Returns the event type corresponding to the event.
 javax.mail.Message getMessage()
          Returns the Message that the event corresponds to.
 java.util.Map<java.lang.String,? extends java.lang.Object> getParams()
          Returns a map of parameters which can be used to pass data to a listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMAIL_SENDING

public static final int EMAIL_SENDING
An email is about to be sent.

See Also:
Constant Field Values

EMAIL_RECEIVED

public static final int EMAIL_RECEIVED
An email was received.

See Also:
Constant Field Values
Constructor Detail

EmailEvent

public EmailEvent(int eventType,
                  javax.mail.Message message,
                  EmailMessage emailMessage,
                  java.util.Map<java.lang.String,? extends java.lang.Object> params)
Creates a new email event.

Parameters:
eventType - the type of the email event.
message - the smtp message envelope the event corresponds to.
emailMessage - the Clearspace email message
params - parameters corresponding to the event.
Method Detail

getEventType

public int getEventType()
Description copied from interface: JiveEvent
Returns the event type corresponding to the event.

Specified by:
getEventType in interface JiveEvent
Returns:
the event type corresponding to the event.

getMessage

public javax.mail.Message getMessage()
Returns the Message that the event corresponds to.

Returns:
the message the event corresponds to.

getEmailMessage

public EmailMessage getEmailMessage()
Returns the Clearspace email message that this email wraps.

Returns:
the Clearspace email message that this email wraps.

getParams

public java.util.Map<java.lang.String,? extends java.lang.Object> getParams()
Description copied from interface: JiveEvent
Returns a map of parameters which can be used to pass data to a listener.

Specified by:
getParams in interface JiveEvent
Returns:
map of parameters which can be used to pass data to a listener.

getDate

public java.util.Date getDate()
Description copied from interface: JiveEvent
Returns the date (as a Date object) that the event was created.

Specified by:
getDate in interface JiveEvent
Returns:
the date (as a Date object) that the event was created.

Clearspace Project Page

Copyright © 1999-2007 Jive Software.