org.apache.camel.component.mail
Class MailMessage

java.lang.Object
  extended by org.apache.camel.impl.MessageSupport
      extended by org.apache.camel.impl.DefaultMessage
          extended by org.apache.camel.component.mail.MailMessage
All Implemented Interfaces:
Message

public class MailMessage
extends DefaultMessage

Represents a Message for working with Mail

Version:
$Revision:520964 $

Constructor Summary
MailMessage()
           
MailMessage(Message message)
           
 
Method Summary
 MailMessage copy()
          Creates a copy of this message so that it can be used and possibly modified further in another exchange
 void copyFrom(Message that)
          Copies the contents of the other message into this message
protected  Object createBody()
          A factory method to allow a provider to lazily create the message body for inbound messages from other sources
 Message getMessage()
          Returns the underlying Mail message
 Message getOriginalMessage()
          Returns the original underlying Mail message
 MailMessage newInstance()
          Returns a new instance
protected  void populateInitialAttachments(Map<String,DataHandler> map)
          A strategy method populate the initial set of attachments on an inbound message from an underlying binding
protected  void populateInitialHeaders(Map<String,Object> map)
          A strategy method populate the initial set of headers on an inbound message from an underlying binding
 void setMessage(Message mailMessage)
           
 String toString()
           
 
Methods inherited from class org.apache.camel.impl.DefaultMessage
addAttachment, createAttachments, createExchangeId, createHeaders, getAttachment, getAttachmentNames, getAttachments, getHeader, getHeader, getHeader, getHeader, getHeaders, hasAttachments, hasHeaders, hasPopulatedHeaders, isFault, removeAttachment, removeHeader, removeHeaders, setAttachments, setFault, setHeader, setHeaders
 
Methods inherited from class org.apache.camel.impl.MessageSupport
createMessageId, getBody, getBody, getBody, getExchange, getMandatoryBody, getMandatoryBody, getMessageId, setBody, setBody, setExchange, setMessageId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailMessage

public MailMessage()

MailMessage

public MailMessage(Message message)
Method Detail

toString

public String toString()
Overrides:
toString in class DefaultMessage

copy

public MailMessage copy()
Description copied from interface: Message
Creates a copy of this message so that it can be used and possibly modified further in another exchange

Specified by:
copy in interface Message
Overrides:
copy in class MessageSupport
Returns:
a new message instance copied from this message

getOriginalMessage

public Message getOriginalMessage()
Returns the original underlying Mail message


getMessage

public Message getMessage()
Returns the underlying Mail message


setMessage

public void setMessage(Message mailMessage)

newInstance

public MailMessage newInstance()
Description copied from class: MessageSupport
Returns a new instance

Overrides:
newInstance in class DefaultMessage

createBody

protected Object createBody()
Description copied from class: MessageSupport
A factory method to allow a provider to lazily create the message body for inbound messages from other sources

Overrides:
createBody in class MessageSupport
Returns:
the value of the message body or null if there is no value available

populateInitialHeaders

protected void populateInitialHeaders(Map<String,Object> map)
Description copied from class: DefaultMessage
A strategy method populate the initial set of headers on an inbound message from an underlying binding

Overrides:
populateInitialHeaders in class DefaultMessage
Parameters:
map - is the empty header map to populate

populateInitialAttachments

protected void populateInitialAttachments(Map<String,DataHandler> map)
Description copied from class: DefaultMessage
A strategy method populate the initial set of attachments on an inbound message from an underlying binding

Overrides:
populateInitialAttachments in class DefaultMessage
Parameters:
map - is the empty attachment map to populate

copyFrom

public void copyFrom(Message that)
Description copied from interface: Message
Copies the contents of the other message into this message

Specified by:
copyFrom in interface Message
Overrides:
copyFrom in class DefaultMessage
Parameters:
that - the other message


Apache CAMEL