|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.component.sjms.jms.JmsMessageHelper
public final class JmsMessageHelper
Utility class for Message.
| Field Summary | |
|---|---|
static String |
JMS_CORRELATION_ID
Set by the publishing Client |
static String |
JMS_DELIVERY_MODE
Set on the send or publish event |
static String |
JMS_DESTINATION
Set on the send or publish event |
static String |
JMS_EXPIRATION
Set on the send or publish event |
static String |
JMS_MESSAGE_ID
Set on the send or publish event |
static String |
JMS_PRIORITY
Set on the send or publish event |
static String |
JMS_REDELIVERED
A redelivery flag set by the JMS provider |
static String |
JMS_REPLY_TO
The JMS Reply To Destination set by the publishing Client |
static String |
JMS_TIMESTAMP
Set on the send or publish event |
static String |
JMS_TYPE
Set by the publishing Client |
| Method Summary | |
|---|---|
static javax.jms.Message |
createMessage(javax.jms.Session session,
Object payload,
Map<String,Object> messageHeaders,
KeyFormatStrategy keyFormatStrategy)
|
static JmsMessageType |
discoverJmsMessageType(javax.jms.Message message)
|
static JmsMessageType |
discoverMessgeTypeFromPayload(Object payload)
|
static void |
setCorrelationId(javax.jms.Message message,
String correlationId)
Sets the correlation id on the JMS message. |
static void |
setJMSDeliveryMode(javax.jms.Message message,
Object deliveryMode)
Sets the JMSDeliveryMode on the message. |
static javax.jms.Message |
setJmsMessageHeaders(javax.jms.Message jmsMessage,
Map<String,Object> messageHeaders,
KeyFormatStrategy keyFormatStrategy)
Adds or updates the Message headers. |
static void |
setMessageType(javax.jms.Message message,
String type)
Sets the correlation id on the JMS message. |
static void |
setProperty(javax.jms.Message jmsMessage,
String name,
Object value)
Sets the property on the given JMS message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String JMS_CORRELATION_ID
public static final String JMS_DELIVERY_MODE
public static final String JMS_DESTINATION
public static final String JMS_EXPIRATION
public static final String JMS_MESSAGE_ID
public static final String JMS_PRIORITY
public static final String JMS_REDELIVERED
public static final String JMS_REPLY_TO
Destination set by the publishing Client
public static final String JMS_TIMESTAMP
public static final String JMS_TYPE
| Method Detail |
|---|
public static javax.jms.Message createMessage(javax.jms.Session session,
Object payload,
Map<String,Object> messageHeaders,
KeyFormatStrategy keyFormatStrategy)
throws Exception
Exception
public static javax.jms.Message setJmsMessageHeaders(javax.jms.Message jmsMessage,
Map<String,Object> messageHeaders,
KeyFormatStrategy keyFormatStrategy)
throws IllegalHeaderException
Message headers. Header names and values are
checked for JMS 1.1 compliance.
jmsMessage - the Message to add or update the headers onmessageHeaders - a Map of String/Object pairskeyFormatStrategy - the a KeyFormatStrategy to used to
format keys in a JMS 1.1 compliant manner. If null the
DefaultJmsKeyFormatStrategy will be used.
Message
Exception - a
IllegalHeaderException
public static void setJMSDeliveryMode(javax.jms.Message message,
Object deliveryMode)
throws javax.jms.JMSException
exchange - the exchangemessage - the messagedeliveryMode - the delivery mode, either as a String or integer
javax.jms.JMSException - is thrown if error setting the delivery
mode
public static void setMessageType(javax.jms.Message message,
String type)
message - the JMS messagetype - the correlation id
public static void setCorrelationId(javax.jms.Message message,
String correlationId)
message - the JMS messagecorrelationId - the correlation id
public static void setProperty(javax.jms.Message jmsMessage,
String name,
Object value)
throws javax.jms.JMSException
jmsMessage - the JMS messagename - name of the property to setvalue - the value
javax.jms.JMSException - can be thrownpublic static JmsMessageType discoverMessgeTypeFromPayload(Object payload)
public static JmsMessageType discoverJmsMessageType(javax.jms.Message message)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||