public class DefaultMailMarshaler extends 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 and Description |
|---|
DefaultMailMarshaler() |
| Modifier and Type | Method and Description |
|---|---|
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
|
addTemporaryResource, cleanUpResources, getAttachmentsMapFromNormalizedMessage, getDefaultSenderForOutgoingMailspublic void convertMailToJBI(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage nmsg,
javax.mail.internet.MimeMessage mailMsg)
throws javax.mail.MessagingException
AbstractMailMarshalerconvertMailToJBI 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 serverjavax.mail.MessagingException - on any conversion errorspublic 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
AbstractMailMarshalerconvertJBIToMail 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 xbeanjavax.mail.MessagingException - on conversion errorsprotected 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 receivedjava.lang.Exception - on any errorsprotected void preparePlainTextMail(javax.mail.internet.MimeMessage mimeMessage,
javax.jbi.messaging.NormalizedMessage nmsg)
throws java.lang.Exception
mimeMessage - the mail messagenmsg - the normalized messagejava.lang.Exception - on errorsprotected 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 messagejava.lang.Exception - on errorsprotected 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 messagejava.lang.Exception - on errorsprotected 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 errorsprotected 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 xbeanjava.lang.Exception - on errorsCopyright © 2005-2014 FuseSource. All Rights Reserved.