Apache CXF API

org.apache.cxf.transport.jms.util
Class JMSUtil

java.lang.Object
  extended by org.apache.cxf.transport.jms.util.JMSUtil

public final class JMSUtil
extends Object


Method Summary
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

receive

public static javax.jms.Message receive(javax.jms.Session session,
                                        javax.jms.Destination replyToDestination,
                                        String correlationId,
                                        long receiveTimeout,
                                        boolean pubSubNoLocal)

convertJmsException

public static RuntimeException convertJmsException(javax.jms.JMSException e)

createCorrelationId

public static String createCorrelationId(String prefix,
                                         long sequenceNUm)

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 type
session - the JMS session
replyTo - the ReplyTo destination if any
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

getNumMessages

public static int getNumMessages(javax.jms.Connection connection,
                                 javax.jms.Queue queue)
                          throws javax.jms.JMSException
Throws:
javax.jms.JMSException

Apache CXF API

Apache CXF