org.apache.servicemix.components.email
Class SimpleMailMarshaler
java.lang.Object
org.apache.servicemix.components.util.MarshalerSupport
org.apache.servicemix.components.email.MailMarshalerSupport
org.apache.servicemix.components.email.SimpleMailMarshaler
public class SimpleMailMarshaler
- extends MailMarshalerSupport
The default marshaler from the NormalizedMessage to a SimpleMailMessage using
expressions for each field required on the email.
- Version:
- $Revision: 2153 $
|
Method Summary |
protected Object |
getBcc(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
|
protected Object |
getCc(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
|
protected String |
getFrom(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
|
protected String |
getReplyTo(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
|
protected Object |
getTo(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
|
void |
prepareMessage(org.springframework.mail.SimpleMailMessage mailMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
Populates the mime email message with values extracted from the message exchange using expressions. |
| Methods inherited from class org.apache.servicemix.components.email.MailMarshalerSupport |
asAddress, asAddressArray, asDate, asStringOrStringArray, getAttachments, getBcc, getCc, getDateFormat, getFrom, getHtml, getHtml, getReplyTo, getSentDate, getSentDate, getSubject, getSubject, getText, getText, getTo, setAttachments, setBcc, setCc, setDateFormat, setFrom, setHtml, setReplyTo, setSentDate, setSubject, setText, setTo |
| 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 |
SimpleMailMarshaler
public SimpleMailMarshaler()
prepareMessage
public void prepareMessage(org.springframework.mail.SimpleMailMessage mailMessage,
javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
throws MessagingException
- Populates the mime email message with values extracted from the message exchange using expressions.
- Parameters:
mailMessage - the mime emailexchange - the JBI message exchangenormalizedMessage - the normalized message from JBI
- Throws:
MessagingException - if the message could not be constructed or there was an error creating an address
getFrom
protected String getFrom(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
throws javax.jbi.messaging.MessagingException,
AddressException
- Throws:
javax.jbi.messaging.MessagingException
AddressException
getReplyTo
protected String getReplyTo(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
throws javax.jbi.messaging.MessagingException
- Throws:
javax.jbi.messaging.MessagingException
getTo
protected Object getTo(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
throws javax.jbi.messaging.MessagingException,
AddressException
- Throws:
javax.jbi.messaging.MessagingException
AddressException
getCc
protected Object getCc(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
throws javax.jbi.messaging.MessagingException,
AddressException
- Throws:
javax.jbi.messaging.MessagingException
AddressException
getBcc
protected Object getBcc(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage normalizedMessage)
throws javax.jbi.messaging.MessagingException,
AddressException
- Throws:
javax.jbi.messaging.MessagingException
AddressException
Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.