org.exolab.jmscts.core
Class ConnectionHelper

java.lang.Object
  |
  +--org.exolab.jmscts.core.ConnectionHelper

public final class ConnectionHelper
extends java.lang.Object

Helper for performing connection operations

Version:
$Revision: 1.4 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson

Method Summary
static javax.jms.ConnectionConsumer createConnectionConsumer(TestContext context, javax.jms.Destination destination, java.lang.String name, java.lang.String selector, javax.jms.ServerSessionPool pool, int maxMessages)
          Create a connection consumer
static javax.jms.Session createSession(TestContext context)
          Create a session of with the same behaviour as that of the supplied context
static javax.jms.Session createSession(TestContext context, AckType type)
          Create a session
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createSession

public static javax.jms.Session createSession(TestContext context,
                                              AckType type)
                                       throws javax.jms.JMSException
Create a session
Parameters:
context - the test context
type - the message acknowledgement type
Returns:
a new session
Throws:
javax.jms.JMSException - if any of the JMS operations fail

createSession

public static javax.jms.Session createSession(TestContext context)
                                       throws javax.jms.JMSException
Create a session of with the same behaviour as that of the supplied context
Parameters:
context - the test context
Returns:
a new session
Throws:
javax.jms.JMSException - if any of the JMS operations fail

createConnectionConsumer

public static javax.jms.ConnectionConsumer createConnectionConsumer(TestContext context,
                                                                    javax.jms.Destination destination,
                                                                    java.lang.String name,
                                                                    java.lang.String selector,
                                                                    javax.jms.ServerSessionPool pool,
                                                                    int maxMessages)
                                                             throws javax.jms.JMSException
Create a connection consumer
Parameters:
context - the test context
destination - the destination to access
name - if non-null, and the connection is a TopicConnection, then a durable connection consumer will be returned, otherwise the argument is ignored.
selector - the message selector. May be null
pool - the server session pool to associate with the consumer
maxMessages - the maximum number of messages that can be assigned to a server session at one time
Returns:
the new connection consumer
Throws:
javax.jms.JMSException - if any of the JMS operations fail


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.