org.apache.jmeter.protocol.jms
Class Utils
java.lang.Object
org.apache.jmeter.protocol.jms.Utils
public final class Utils
- extends Object
Utility methods for JMS protocol.
WARNING - the API for this class is likely to change!
Constructor Summary |
Utils()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
close
public static void close(javax.jms.MessageConsumer closeable,
org.apache.log.Logger log)
close
public static void close(javax.jms.Session closeable,
org.apache.log.Logger log)
close
public static void close(javax.jms.Connection closeable,
org.apache.log.Logger log)
close
public static void close(javax.jms.MessageProducer closeable,
org.apache.log.Logger log)
messageProperties
public static String messageProperties(javax.jms.Message msg)
messageProperties
public static StringBuilder messageProperties(StringBuilder sb,
javax.jms.Message msg)
requestHeaders
public static StringBuilder requestHeaders(StringBuilder sb,
javax.jms.Message msg)
lookupDestination
public static javax.jms.Destination lookupDestination(Context context,
String name)
throws NamingException
- Method will lookup a given destination (topic/queue) using JNDI.
- Parameters:
context
- name
- the destination name
- Returns:
- the destination, never null
- Throws:
NamingException
- if the name cannot be found as a Destination
getConnection
public static javax.jms.Connection getConnection(Context ctx,
String factoryName)
throws javax.jms.JMSException,
NamingException
- Obtain the queue connection from the context and factory name.
- Parameters:
ctx
- factoryName
-
- Returns:
- the queue connection
- Throws:
javax.jms.JMSException
NamingException
Copyright © 1998-2011 Apache Software Foundation. All Rights Reserved.