|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.components.util.MarshalerSupport
org.apache.servicemix.mail.marshaler.AbstractMailMarshaler
public abstract class AbstractMailMarshaler
this is the abstract super class of all marshalers which want to convert between normalized messages and mail messages and vice versa.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_SENDER
the default sender address for outgoing mails |
static java.lang.String |
DUMMY_CONTENT
the dummy content - set if no content was provided |
static java.lang.String |
DUMMY_SUBJECT
the dummy subject - set if no subject was provided |
static java.lang.String |
MAIL_TAG_BCC
this is the tag for the "Bcc" field of the email |
static java.lang.String |
MAIL_TAG_CC
this is the tag for the "Cc" field of the email |
static java.lang.String |
MAIL_TAG_FROM
this is the tag for the "From" field of the email |
static java.lang.String |
MAIL_TAG_REPLYTO
this is the tag for the "Reply-To" field of the email |
static java.lang.String |
MAIL_TAG_SENTDATE
this is the tag for the "Date" field of the email |
static java.lang.String |
MAIL_TAG_SUBJECT
this is the tag for the "Subject" field of the email |
static java.lang.String |
MAIL_TAG_TO
this is the tag for the "To" field of the email |
static java.lang.String |
MSG_TAG_BCC
this tag is used in normalized messages to represent the BCC address this exchange should be mailed to |
static java.lang.String |
MSG_TAG_CC
this tag is used in normalized messages to represent the CC address the mail was sent to OR the CC address this exchange should be mailed to |
static java.lang.String |
MSG_TAG_FROM
this tag is used in normalized messages to represent the address the mail was received from OR the address this exchange should be sent from |
static java.lang.String |
MSG_TAG_HOST
this tag is used in normalized messages to represent the mail server hostname |
static java.lang.String |
MSG_TAG_HTML
this tag is used in normalized messages to represent the html content used in the received mail or to be used in the mail to be sent |
static java.lang.String |
MSG_TAG_MAIL_CHARSET
this tag is used in normalized messages to represent the charset used in the received mail or to be used in the mail to be sent |
static java.lang.String |
MSG_TAG_MAIL_CONTENT_TYPE
this tag is used in normalized messages to represent the content type of the mail received or the mail to be sent |
static java.lang.String |
MSG_TAG_MAIL_USE_INLINE_ATTACHMENTS
this tag is used in normalized messages to flag that the attachments have to be treatened as inline attachments |
static java.lang.String |
MSG_TAG_PASSWORD
this tag is used in normalized messages to represent the password of the mail account |
static java.lang.String |
MSG_TAG_PORT
this tag is used in normalized messages to represent the port number used for mail server |
static java.lang.String |
MSG_TAG_PROTOCOL
this tag is used in normalized messages to represent the used protocol |
static java.lang.String |
MSG_TAG_REPLYTO
this tag is used in normalized messages to represent the reply-to address of the mail received OR the reply-to address of the mail to be sent |
static java.lang.String |
MSG_TAG_SENTDATE
this tag is used in normalized messages to represent the date when the mail was sent |
static java.lang.String |
MSG_TAG_SUBJECT
this tag is used in normalized messages to represent the subject of the mail received OR the subject of the mail to be sent |
static java.lang.String |
MSG_TAG_TEXT
this tag is used in normalized messages to represent the plain text content used in the received mail or to be used in the mail to be sent |
static java.lang.String |
MSG_TAG_TO
this tag is used in normalized messages to represent the address the mail was sent to OR the address this exchange should be mailed to |
static java.lang.String |
MSG_TAG_USER
this tag is used in normalized messages to represent the user which owns the mail account |
| Constructor Summary | |
|---|---|
AbstractMailMarshaler()
|
|
| Method Summary | |
|---|---|
protected void |
addTemporaryResource(java.lang.String id,
java.io.File tmpFile)
adds a temporary file resource to the list of to be cleaned up resources |
void |
cleanUpResources(java.lang.String id)
deletes all temporary resources of a given exchange id |
abstract void |
convertJBIToMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
java.lang.String configuredSender,
java.lang.String configuredReceiver)
This method is used to convert a normalized message from the bus into a mime mail message to be sent to a mail server. |
abstract void |
convertMailToJBI(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
javax.mail.internet.MimeMessage mailMsg)
This method is used to convert a mime mail message received via an email server into a normalized message which will be sent to the bus. |
protected java.util.Map<java.lang.String,javax.activation.DataSource> |
getAttachmentsMapFromNormalizedMessage(javax.jbi.messaging.NormalizedMessage normalizedMessage)
This helper method extracts all attachments from the normalized message into a map of attachments which may be used for filling the attachments of an outgoing mail |
java.lang.String |
getDefaultSenderForOutgoingMails()
returns the default sender for outgoing mails Override this method to deliver your own default sender! |
| Methods inherited from class org.apache.servicemix.components.util.MarshalerSupport |
|---|
asString, getTransformer, setTransformer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MAIL_TAG_TO
public static final java.lang.String MAIL_TAG_CC
public static final java.lang.String MAIL_TAG_BCC
public static final java.lang.String MAIL_TAG_FROM
public static final java.lang.String MAIL_TAG_SUBJECT
public static final java.lang.String MAIL_TAG_REPLYTO
public static final java.lang.String MAIL_TAG_SENTDATE
public static final java.lang.String MSG_TAG_TO
public static final java.lang.String MSG_TAG_CC
public static final java.lang.String MSG_TAG_BCC
public static final java.lang.String MSG_TAG_FROM
public static final java.lang.String MSG_TAG_SUBJECT
public static final java.lang.String MSG_TAG_REPLYTO
public static final java.lang.String MSG_TAG_SENTDATE
public static final java.lang.String MSG_TAG_MAIL_CONTENT_TYPE
public static final java.lang.String MSG_TAG_MAIL_CHARSET
public static final java.lang.String MSG_TAG_MAIL_USE_INLINE_ATTACHMENTS
public static final java.lang.String MSG_TAG_TEXT
public static final java.lang.String MSG_TAG_HTML
public static final java.lang.String DEFAULT_SENDER
public static final java.lang.String MSG_TAG_USER
public static final java.lang.String MSG_TAG_PASSWORD
public static final java.lang.String MSG_TAG_HOST
public static final java.lang.String MSG_TAG_PROTOCOL
public static final java.lang.String MSG_TAG_PORT
public static final java.lang.String DUMMY_SUBJECT
public static final java.lang.String DUMMY_CONTENT
| Constructor Detail |
|---|
public AbstractMailMarshaler()
| Method Detail |
|---|
public abstract void convertMailToJBI(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
javax.mail.internet.MimeMessage mailMsg)
throws javax.mail.MessagingException
exchange - the message exchange that will be sent to the busnmsg - the normalized in-message to be filled by this methodmailMsg - the mail message that was received via mail server
javax.mail.MessagingException - on any conversion errors
public abstract void convertJBIToMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
java.lang.String configuredSender,
java.lang.String configuredReceiver)
throws javax.mail.MessagingException
mimeMessage - the mime mail message to be filled by this methodexchange - the message exchange from JBI busnmsg - the normalized message to transform to mail messageconfiguredSender - the sender configured in the xbeanconfiguredReceiver - the receiver configured in the xbean
javax.mail.MessagingException - on conversion errorspublic java.lang.String getDefaultSenderForOutgoingMails()
protected final java.util.Map<java.lang.String,javax.activation.DataSource> getAttachmentsMapFromNormalizedMessage(javax.jbi.messaging.NormalizedMessage normalizedMessage)
normalizedMessage - the normalized message with attachments
protected final void addTemporaryResource(java.lang.String id,
java.io.File tmpFile)
id - the id of the message exchangetmpFile - the temp resourcepublic final void cleanUpResources(java.lang.String id)
id - the exchange id
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||