org.mule.providers.email
Class MailMessageAdapter

java.lang.Object
  extended byorg.mule.providers.AbstractMessageAdapter
      extended byorg.mule.providers.email.SimpleMailMessageAdapter
          extended byorg.mule.providers.email.MailMessageAdapter
All Implemented Interfaces:
Serializable, ThreadSafeAccess, UMOMessageAdapter

public class MailMessageAdapter
extends SimpleMailMessageAdapter

MailMessageAdapter is a wrapper for a javax.mail.Message that separates multi-part mail messages, storing all but the first part as attachments to the underlying AbstractMessageAdapter. Alternatively, you can use SimpleMailMessageAdapter, which stores the message as a single entity.

See Also:
Serialized Form

Field Summary
static String ATTACHMENT_HEADERS_PROPERTY_POSTFIX
           
 
Fields inherited from class org.mule.providers.email.SimpleMailMessageAdapter
HEADER_LIST_PREFIX
 
Fields inherited from class org.mule.providers.AbstractMessageAdapter
attachments, DEFAULT_FAILFAST, encoding, exceptionPayload, id, logger, properties, READ, WRITE
 
Constructor Summary
MailMessageAdapter(Object object)
           
 
Method Summary
protected  void addAttachmentHeaders(String name, Part part)
           
protected  void handleMessage(Message message)
          Store only the first body part directly; add further parts as attachments.
 
Methods inherited from class org.mule.providers.email.SimpleMailMessageAdapter
getPayload, getPayloadAsBytes, getPayloadAsString, isListHeader, newThreadCopy, setMessage, toHeader, toListHeader
 
Methods inherited from class org.mule.providers.AbstractMessageAdapter
addAttachment, addProperties, assertAccess, clearProperties, convertToBytes, getAttachment, getAttachmentNames, getBooleanProperty, getCorrelationGroupSize, getCorrelationId, getCorrelationSequence, getDoubleProperty, getEncoding, getExceptionPayload, getIntProperty, getLongProperty, getPayloadAsString, getProperty, getProperty, getPropertyNames, getReplyTo, getStringProperty, getUniqueId, isDisabled, newException, removeAttachment, removeProperty, resetAccessControl, setBooleanProperty, setCorrelationGroupSize, setCorrelationId, setCorrelationSequence, setDoubleProperty, setEncoding, setExceptionPayload, setIntProperty, setLongProperty, setProperty, setReplyTo, setStringProperty, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTACHMENT_HEADERS_PROPERTY_POSTFIX

public static final String ATTACHMENT_HEADERS_PROPERTY_POSTFIX
See Also:
Constant Field Values
Constructor Detail

MailMessageAdapter

public MailMessageAdapter(Object object)
                   throws MessagingException
Method Detail

handleMessage

protected void handleMessage(Message message)
                      throws Exception
Store only the first body part directly; add further parts as attachments.

Overrides:
handleMessage in class SimpleMailMessageAdapter
Throws:
Exception

addAttachmentHeaders

protected void addAttachmentHeaders(String name,
                                    Part part)
                             throws MessagingException
Throws:
MessagingException


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.