public final class JMSUtil extends Object
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
convertJmsException(javax.jms.JMSException e) |
static javax.jms.Message |
createAndSetPayload(Object payload,
javax.jms.Session session,
String messageType)
Create a JMS of the appropriate type populated with the given payload.
|
static String |
createCorrelationId(String prefix,
long sequenceNUm) |
static javax.jms.Queue |
createQueue(javax.jms.Connection connection,
String name) |
static int |
getNumMessages(javax.jms.Connection connection,
javax.jms.Queue queue) |
static javax.jms.Message |
receive(javax.jms.Session session,
javax.jms.Destination replyToDestination,
String correlationId,
long receiveTimeout,
boolean pubSubNoLocal) |
public static javax.jms.Message receive(javax.jms.Session session, javax.jms.Destination replyToDestination, String correlationId, long receiveTimeout, boolean pubSubNoLocal)
public static RuntimeException convertJmsException(javax.jms.JMSException e)
public static javax.jms.Message createAndSetPayload(Object payload, javax.jms.Session session, String messageType) throws javax.jms.JMSException
payload
- the message payload, expected to be either of type String or byte[] depending on payload
typesession
- the JMS sessionreplyTo
- the ReplyTo destination if anyjavax.jms.JMSException
public static javax.jms.Queue createQueue(javax.jms.Connection connection, String name) throws javax.jms.JMSException
javax.jms.JMSException
public static int getNumMessages(javax.jms.Connection connection, javax.jms.Queue queue) throws javax.jms.JMSException
javax.jms.JMSException
Apache CXF