|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Mail
Wrap a MimeMessage with routing information (from SMTP) such as SMTP specified recipients, sender, and ip address and hostname of sending server. It also contains its state which represents which processor in the mailet container it is currently running. Special processor names are "root" and "error".
Field Summary | |
---|---|
static java.lang.String |
DEFAULT
|
static java.lang.String |
ERROR
|
static java.lang.String |
GHOST
|
static java.lang.String |
TRANSPORT
|
Method Summary | |
---|---|
java.io.Serializable |
getAttribute(java.lang.String name)
Returns the Mail session attribute with the given name, or null if there is no attribute by that name. |
java.util.Iterator |
getAttributeNames()
Returns an Iterator containing the attribute names currently available within this Mail instance. |
java.lang.String |
getErrorMessage()
The error message, if any, associated with this message. |
java.util.Date |
getLastUpdated()
|
javax.mail.internet.MimeMessage |
getMessage()
Returns the MimeMessage stored in this message |
long |
getMessageSize()
|
java.lang.String |
getName()
Returns the message name of this message |
java.util.Collection |
getRecipients()
Returns a Collection of MailAddress objects that are recipients of this message |
java.lang.String |
getRemoteAddr()
The remote ip address of the server that connected to send this message |
java.lang.String |
getRemoteHost()
The remote hostname of the server that connected to send this message |
MailAddress |
getSender()
The sender of the message, as specified by the MAIL FROM header, or internally defined |
java.lang.String |
getState()
The current state of the message, such as GHOST, ERROR, or DEFAULT |
boolean |
hasAttributes()
|
void |
removeAllAttributes()
Removes all the attributes associated with this Mail instance. |
java.io.Serializable |
removeAttribute(java.lang.String name)
Removes the attribute with the given name from this Mail instance. |
java.io.Serializable |
setAttribute(java.lang.String name,
java.io.Serializable object)
Binds an object to a given attribute name in this Mail instance. |
void |
setErrorMessage(java.lang.String msg)
Sets the error message associated with this message. |
void |
setLastUpdated(java.util.Date lastUpdated)
|
void |
setMessage(javax.mail.internet.MimeMessage message)
Sets the MimeMessage associated with this message via the object. |
void |
setName(java.lang.String newName)
Set the message name of this message |
void |
setRecipients(java.util.Collection recipients)
Method setRecipients. |
void |
setState(java.lang.String state)
Sets the state of this message. |
Field Detail |
---|
static final java.lang.String GHOST
static final java.lang.String DEFAULT
static final java.lang.String ERROR
static final java.lang.String TRANSPORT
Method Detail |
---|
java.lang.String getName()
void setName(java.lang.String newName)
newName
- new namejavax.mail.internet.MimeMessage getMessage() throws javax.mail.MessagingException
javax.mail.MessagingException
- - an error occured while loading this objectjava.util.Collection getRecipients()
void setRecipients(java.util.Collection recipients)
recipients
- a Collection of MailAddress Objects representing the recipients of this messageMailAddress getSender()
java.lang.String getState()
java.lang.String getRemoteHost()
java.lang.String getRemoteAddr()
java.lang.String getErrorMessage()
void setErrorMessage(java.lang.String msg)
msg
- - a descriptive error messagevoid setMessage(javax.mail.internet.MimeMessage message)
message
- - the new MimeMessage that this Mail object will wrapvoid setState(java.lang.String state)
state
- - the new state of this messagejava.io.Serializable getAttribute(java.lang.String name)
A list of currently set attributes can be retrieved using getAttributeNames.
The attribute is returned as a java.lang.Object or some subclass. Attribute names should follow the same convention as package names. The Mailet API specification reserves names matching org.apache.james.* and org.apache.mailet.*.
name
- - a String specifying the name of the attribute
java.util.Iterator getAttributeNames()
boolean hasAttributes()
java.io.Serializable removeAttribute(java.lang.String name)
name
- - a String specifying the name of the attribute to be removed
void removeAllAttributes()
java.io.Serializable setAttribute(java.lang.String name, java.io.Serializable object)
Attribute names should follow the same convention as package names. The Mailet API specification reserves names matching org.apache.james.* and org.apache.mailet.*.
name
- - a String specifying the name of the attributeobject
- - a Serializable Object representing the attribute to be bound
long getMessageSize() throws javax.mail.MessagingException
javax.mail.MessagingException
java.util.Date getLastUpdated()
void setLastUpdated(java.util.Date lastUpdated)
lastUpdated
- the new last updated date
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |