org.apache.camel.component.mail
Class MailBinding

java.lang.Object
  extended by org.apache.camel.component.mail.MailBinding

public class MailBinding
extends Object

A Strategy used to convert between a Camel and to and from a Mail MimeMessage

Version:
$Revision: 521240 $

Constructor Summary
MailBinding()
           
 
Method Summary
protected  void appendHeadersFromCamel(MimeMessage mimeMessage, org.apache.camel.Exchange exchange, org.apache.camel.Message camelMessage)
          Appends the Mail headers from the Camel MailMessage
protected  String asString(org.apache.camel.Exchange exchange, Object value)
          Converts the given object value to a String
protected  boolean empty(Address[] addresses)
           
 Object extractBodyFromMail(MailExchange exchange, Message message)
          Extracts the body from the Mail message
 void populateMailMessage(MailEndpoint endpoint, MimeMessage mimeMessage, org.apache.camel.Exchange exchange)
           
protected  boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, Object headerValue)
          Strategy to allow filtering of headers which are put on the Mail message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailBinding

public MailBinding()
Method Detail

populateMailMessage

public void populateMailMessage(MailEndpoint endpoint,
                                MimeMessage mimeMessage,
                                org.apache.camel.Exchange exchange)

empty

protected boolean empty(Address[] addresses)

extractBodyFromMail

public Object extractBodyFromMail(MailExchange exchange,
                                  Message message)
Extracts the body from the Mail message

Parameters:
exchange -
message -

appendHeadersFromCamel

protected void appendHeadersFromCamel(MimeMessage mimeMessage,
                                      org.apache.camel.Exchange exchange,
                                      org.apache.camel.Message camelMessage)
                               throws MessagingException
Appends the Mail headers from the Camel MailMessage

Throws:
MessagingException

asString

protected String asString(org.apache.camel.Exchange exchange,
                          Object value)
Converts the given object value to a String


shouldOutputHeader

protected boolean shouldOutputHeader(org.apache.camel.Message camelMessage,
                                     String headerName,
                                     Object headerValue)
Strategy to allow filtering of headers which are put on the Mail message



Copyright © 2007 Apache Software Foundation. All Rights Reserved.