Class JMSUtil
- java.lang.Object
-
- org.apache.cxf.transport.jms.util.JMSUtil
-
public final class JMSUtil extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringJMS_IGNORE_TIMEOUTstatic StringJMS_MESSAGE_CONSUMER
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static RuntimeExceptionconvertJmsException(javax.jms.JMSException e)static javax.jms.MessagecreateAndSetPayload(Object payload, javax.jms.Session session, String messageType)Create a JMS of the appropriate type populated with the given payload.static StringcreateCorrelationId(String prefix, long sequenceNum)static javax.jms.QueuecreateQueue(javax.jms.Connection connection, String name)static javax.jms.Messagereceive(javax.jms.Session session, javax.jms.Destination replyToDestination, String correlationId, long receiveTimeout, boolean pubSubNoLocal)static javax.jms.Messagereceive(javax.jms.Session session, javax.jms.Destination replyToDestination, String correlationId, long receiveTimeout, boolean pubSubNoLocal, Exchange exchange)
-
-
-
Field Detail
-
JMS_MESSAGE_CONSUMER
public static final String JMS_MESSAGE_CONSUMER
- See Also:
- Constant Field Values
-
JMS_IGNORE_TIMEOUT
public static final String JMS_IGNORE_TIMEOUT
- See Also:
- Constant Field Values
-
-
Method Detail
-
receive
public static javax.jms.Message receive(javax.jms.Session session, javax.jms.Destination replyToDestination, String correlationId, long receiveTimeout, boolean pubSubNoLocal)
-
receive
public static javax.jms.Message receive(javax.jms.Session session, javax.jms.Destination replyToDestination, String correlationId, long receiveTimeout, boolean pubSubNoLocal, Exchange exchange)
-
convertJmsException
public static RuntimeException convertJmsException(javax.jms.JMSException e)
-
createAndSetPayload
public static javax.jms.Message createAndSetPayload(Object payload, javax.jms.Session session, String messageType) throws javax.jms.JMSException
Create a JMS of the appropriate type populated with the given payload.- Parameters:
payload- the message payload, expected to be either of type String or byte[] depending on payload typesession- the JMS sessionmessageType- the JMS message type- Returns:
- a JMS of the appropriate type populated with the given payload
- Throws:
javax.jms.JMSException
-
createQueue
public static javax.jms.Queue createQueue(javax.jms.Connection connection, String name) throws javax.jms.JMSException- Throws:
javax.jms.JMSException
-
-