org.apache.camel.component.jms
Class JmsBinding

java.lang.Object
  extended by org.apache.camel.component.jms.JmsBinding

public class JmsBinding
extends Object

A Strategy used to convert between a Camel and to and from a JMS Message

Version:
$Revision: 564568 $

Constructor Summary
JmsBinding()
           
 
Method Summary
protected  void appendJmsProperties(Message jmsMessage, org.apache.camel.Exchange exchange, Session session)
          Appends the JMS headers from the Camel JmsMessage
protected  Message createJmsMessage(Object body, Session session)
           
 Map<String,Object> createMapFromMapMessage(MapMessage message)
          Extracts a Map from a MapMessage
 Object extractBodyFromJms(JmsExchange exchange, Message message)
          Extracts the body from the JMS message
 Message makeJmsMessage(org.apache.camel.Exchange exchange, Session session)
          Creates a JMS message from the Camel exchange and message
protected  boolean shouldOutputHeader(org.apache.camel.Message camelMessage, String headerName, Object headerValue)
          Strategy to allow filtering of headers which are put on the JMS message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmsBinding

public JmsBinding()
Method Detail

extractBodyFromJms

public Object extractBodyFromJms(JmsExchange exchange,
                                 Message message)
Extracts the body from the JMS message

Parameters:
exchange -
message -

makeJmsMessage

public Message makeJmsMessage(org.apache.camel.Exchange exchange,
                              Session session)
                       throws JMSException
Creates a JMS message from the Camel exchange and message

Parameters:
session - the JMS session used to create the message
Returns:
a newly created JMS Message instance containing the
Throws:
JMSException - if the message could not be created

appendJmsProperties

protected void appendJmsProperties(Message jmsMessage,
                                   org.apache.camel.Exchange exchange,
                                   Session session)
                            throws JMSException
Appends the JMS headers from the Camel JmsMessage

Throws:
JMSException

createJmsMessage

protected Message createJmsMessage(Object body,
                                   Session session)
                            throws JMSException
Throws:
JMSException

createMapFromMapMessage

public Map<String,Object> createMapFromMapMessage(MapMessage message)
                                           throws JMSException
Extracts a Map from a MapMessage

Throws:
JMSException

shouldOutputHeader

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



Copyright © 2007 Apache Software Foundation. All Rights Reserved.