|
||||||||||
| 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
org.apache.servicemix.mail.marshaler.DefaultMailMarshaler
public class DefaultMailMarshaler
this is the default marshaler for conversion between the normalized message format and the mail message format
| Field Summary |
|---|
| Fields inherited from class org.apache.servicemix.mail.marshaler.AbstractMailMarshaler |
|---|
DEFAULT_SENDER, DUMMY_CONTENT, DUMMY_SUBJECT, MAIL_TAG_BCC, MAIL_TAG_CC, MAIL_TAG_FROM, MAIL_TAG_REPLYTO, MAIL_TAG_SENTDATE, MAIL_TAG_SUBJECT, MAIL_TAG_TO, MSG_TAG_BCC, MSG_TAG_CC, MSG_TAG_FROM, MSG_TAG_HOST, MSG_TAG_HTML, MSG_TAG_MAIL_CHARSET, MSG_TAG_MAIL_CONTENT_TYPE, MSG_TAG_MAIL_USE_INLINE_ATTACHMENTS, MSG_TAG_PASSWORD, MSG_TAG_PORT, MSG_TAG_PROTOCOL, MSG_TAG_REPLYTO, MSG_TAG_SENTDATE, MSG_TAG_SUBJECT, MSG_TAG_TEXT, MSG_TAG_TO, MSG_TAG_USER |
| Constructor Summary | |
|---|---|
DefaultMailMarshaler()
|
|
| Method Summary | |
|---|---|
protected void |
appendAttachments(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
javax.mail.internet.MimeMultipart multipart,
java.lang.String partType)
appends all attachments to the mime message |
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. |
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 void |
fillMailBodyAndAttachments(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg)
fills all attachments from the normalized message into the mail message |
protected void |
fillMailHeaders(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.NormalizedMessage nmsg,
java.lang.String configuredSender,
java.lang.String configuredReceiver)
fills the mail headers according to the normalized message headers |
protected void |
prepareAlternativeMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg)
prepares a multipart alternative mail message (both html and text) |
protected void |
prepareMixedMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg)
prepares a multipart mixed mail message |
protected void |
preparePlainTextMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.NormalizedMessage nmsg)
prepares a plain text mail message |
| Methods inherited from class org.apache.servicemix.mail.marshaler.AbstractMailMarshaler |
|---|
addTemporaryResource, cleanUpResources, getAttachmentsMapFromNormalizedMessage, getDefaultSenderForOutgoingMails |
| 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 |
| Constructor Detail |
|---|
public DefaultMailMarshaler()
| Method Detail |
|---|
public void convertMailToJBI(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
javax.mail.internet.MimeMessage mailMsg)
throws javax.mail.MessagingException
AbstractMailMarshaler
convertMailToJBI in class AbstractMailMarshalerexchange - 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 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
AbstractMailMarshaler
convertJBIToMail in class AbstractMailMarshalermimeMessage - 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 errors
protected void fillMailBodyAndAttachments(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg)
throws java.lang.Exception
mimeMessage - the mail message to fillexchange - the received exchangenmsg - the normalized message received
java.lang.Exception - on any errors
protected void preparePlainTextMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.NormalizedMessage nmsg)
throws java.lang.Exception
mimeMessage - the mail messagenmsg - the normalized message
java.lang.Exception - on errors
protected void prepareMixedMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg)
throws java.lang.Exception
mimeMessage - the mail messageexchange - the message exchangenmsg - the normalized message
java.lang.Exception - on errors
protected void prepareAlternativeMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg)
throws java.lang.Exception
mimeMessage - the mail messageexchange - the message exchangenmsg - the normalized message
java.lang.Exception - on errors
protected void appendAttachments(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
javax.mail.internet.MimeMultipart multipart,
java.lang.String partType)
throws java.lang.Exception
exchange - the message exchangenmsg - the normalized messagemultipart - the mime multipartpartType - the part type (INLINE / ATTACHMENT)
java.lang.Exception - on any errors
protected void fillMailHeaders(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.NormalizedMessage nmsg,
java.lang.String configuredSender,
java.lang.String configuredReceiver)
throws java.lang.Exception
mimeMessage - the mail message to fillnmsg - the normalized message receivedconfiguredSender - the configured sender from xbeanconfiguredReceiver - the configured receiver from xbean
java.lang.Exception - on errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||