public final class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static void |
addJMSProperties(Message msg,
Map<String,Object> map)
Set JMS Properties to msg
|
static void |
close(Connection closeable,
Logger log) |
static void |
close(MessageConsumer closeable,
Logger log) |
static void |
close(MessageProducer closeable,
Logger log) |
static void |
close(Session closeable,
Logger log) |
static JMSProperties |
convertArgumentsToJmsProperties(Arguments args)
Converts
Arguments to JMSProperties defaulting to String type
Used to convert version <= 2.10 test plans |
static Connection |
getConnection(Context ctx,
String factoryName)
Obtain the queue connection from the context and factory name.
|
static Destination |
lookupDestination(Context context,
String name)
Method will lookup a given destination (topic/queue) using JNDI.
|
static String |
messageProperties(Message msg) |
static StringBuilder |
messageProperties(StringBuilder sb,
Message msg) |
static StringBuilder |
requestHeaders(StringBuilder sb,
Message msg) |
public static void close(MessageConsumer closeable, Logger log)
public static void close(Session closeable, Logger log)
public static void close(Connection closeable, Logger log)
public static void close(MessageProducer closeable, Logger log)
public static String messageProperties(Message msg)
public static StringBuilder messageProperties(StringBuilder sb, Message msg)
public static StringBuilder requestHeaders(StringBuilder sb, Message msg)
public static Destination lookupDestination(Context context, String name) throws NamingException
context
- name
- the destination nameNamingException
- if the name cannot be found as a Destinationpublic static Connection getConnection(Context ctx, String factoryName) throws JMSException, NamingException
ctx
- factoryName
- JMSException
NamingException
public static void addJMSProperties(Message msg, Map<String,Object> map) throws JMSException
msg
- Messagemap
- MapJMSException
public static final JMSProperties convertArgumentsToJmsProperties(Arguments args)
Arguments
to JMSProperties
defaulting to String type
Used to convert version <= 2.10 test plansargs
- Arguments
JMSProperties
Copyright © 1998-2015 Apache Software Foundation. All Rights Reserved.