|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.jms.JmsBinding
public class JmsBinding
A Strategy used to convert between a Camel Exchange and JmsMessage
to and from a JMS Message
| Constructor Summary | |
|---|---|
JmsBinding()
|
|
JmsBinding(JmsEndpoint endpoint)
|
|
| Method Summary | |
|---|---|
void |
appendJmsProperties(Message jmsMessage,
Exchange exchange)
Appends the JMS headers from the Camel JmsMessage |
void |
appendJmsProperties(Message jmsMessage,
Exchange exchange,
Message in)
Appends the JMS headers from the Camel JmsMessage |
void |
appendJmsProperty(Message jmsMessage,
Exchange exchange,
Message in,
String headerName,
Object headerValue)
|
protected byte[] |
createByteArrayFromBytesMessage(BytesMessage message)
|
protected Message |
createJmsMessage(Exception cause,
Session session)
|
protected Message |
createJmsMessage(Exchange exchange,
Object body,
Map<String,Object> headers,
Session session,
CamelContext context)
|
Map<String,Object> |
createMapFromMapMessage(MapMessage message)
Extracts a Map from a MapMessage |
Object |
extractBodyFromJms(Exchange exchange,
Message message)
Extracts the body from the JMS message |
Map<String,Object> |
extractHeadersFromJms(Message jmsMessage,
Exchange exchange)
|
Object |
getObjectProperty(Message jmsMessage,
String name)
|
protected Object |
getValidJMSHeaderValue(String headerName,
Object headerValue)
Strategy to test if the given header is valid according to the JMS spec to be set as a property on the JMS message. |
protected boolean |
isStandardJMSHeader(String headerName)
Is the given header a standard JMS header |
Message |
makeJmsMessage(Exchange exchange,
Message camelMessage,
Session session,
Exception cause)
Creates a JMS message from the Camel exchange and message |
Message |
makeJmsMessage(Exchange exchange,
Session session)
Creates a JMS message from the Camel exchange and message |
protected void |
populateMapMessage(MapMessage message,
Map<?,?> map,
CamelContext context)
Populates a MapMessage from a Map instance. |
protected boolean |
shouldOutputHeader(Message camelMessage,
String headerName,
Object headerValue,
Exchange exchange)
Strategy to allow filtering of headers which are put on the JMS message Note: Currently only supports sending java identifiers as keys |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JmsBinding()
public JmsBinding(JmsEndpoint endpoint)
| Method Detail |
|---|
public Object extractBodyFromJms(Exchange exchange,
Message message)
exchange - the exchangemessage - the message to extract its body
public Map<String,Object> extractHeadersFromJms(Message jmsMessage,
Exchange exchange)
public Object getObjectProperty(Message jmsMessage,
String name)
throws JMSException
JMSException
protected byte[] createByteArrayFromBytesMessage(BytesMessage message)
throws JMSException
JMSException
public Message makeJmsMessage(Exchange exchange,
Session session)
throws JMSException
exchange - the current exchangesession - the JMS session used to create the message
JMSException - if the message could not be created
public Message makeJmsMessage(Exchange exchange,
Message camelMessage,
Session session,
Exception cause)
throws JMSException
exchange - the current exchangecamelMessage - the body to make a javax.jms.Message assession - the JMS session used to create the messagecause - optional exception occurred that should be sent as reply instead of a regular body
JMSException - if the message could not be created
public void appendJmsProperties(Message jmsMessage,
Exchange exchange)
throws JMSException
JmsMessage
JMSException
public void appendJmsProperties(Message jmsMessage,
Exchange exchange,
Message in)
throws JMSException
JmsMessage
JMSException
public void appendJmsProperty(Message jmsMessage,
Exchange exchange,
Message in,
String headerName,
Object headerValue)
throws JMSException
JMSExceptionprotected boolean isStandardJMSHeader(String headerName)
headerName - the header name
protected Object getValidJMSHeaderValue(String headerName,
Object headerValue)
headerName - the header nameheaderValue - the header value
protected Message createJmsMessage(Exception cause,
Session session)
throws JMSException
JMSException
protected Message createJmsMessage(Exchange exchange,
Object body,
Map<String,Object> headers,
Session session,
CamelContext context)
throws JMSException
JMSException
protected void populateMapMessage(MapMessage message,
Map<?,?> map,
CamelContext context)
throws JMSException
MapMessage from a Map instance.
JMSException
public Map<String,Object> createMapFromMapMessage(MapMessage message)
throws JMSException
Map from a MapMessage
JMSException
protected boolean shouldOutputHeader(Message camelMessage,
String headerName,
Object headerValue,
Exchange exchange)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||