|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jmscts.core.SessionHelper
Helper class for performing session operations
Method Summary | |
static javax.jms.MessageConsumer |
createConsumer(javax.jms.Session session,
javax.jms.Destination destination,
java.lang.String name)
Create a message consumer for the supplied session and destination. |
static javax.jms.MessageConsumer |
createConsumer(javax.jms.Session session,
javax.jms.Destination destination,
java.lang.String name,
java.lang.String selector,
boolean noLocal)
Create a message consumer for the supplied session and destination and selector. |
static javax.jms.MessageConsumer |
createConsumer(TestContext context,
javax.jms.Destination destination,
java.lang.String name)
Create a message consumer for the supplied test context and destination |
static javax.jms.MessageProducer |
createProducer(javax.jms.Session session,
javax.jms.Destination destination)
Create a message producer for the supplied test session and destination |
static javax.jms.MessageProducer |
createProducer(TestContext context,
javax.jms.Destination destination)
Create a message producer for the supplied test context and destination |
static MessageReceiver |
createReceiver(javax.jms.Session session,
javax.jms.Destination destination,
MessagingBehaviour behaviour)
Create a MessageReceiver for the supplied session, destination,
and messaging behaviour |
static MessageReceiver |
createReceiver(javax.jms.Session session,
javax.jms.Destination destination,
MessagingBehaviour behaviour,
java.lang.String selector,
boolean noLocal)
Create a MessageReceiver for the supplied session, destination,
messaging behaviour, and selector |
static MessageReceiver |
createReceiver(javax.jms.Session session,
javax.jms.Destination destination,
MessagingBehaviour behaviour,
java.lang.String name,
java.lang.String selector,
boolean noLocal)
Create a MessageReceiver for the supplied session, destination,
messaging behaviour, and selector |
static MessageReceiver |
createReceiver(TestContext context,
javax.jms.Destination destination)
Create a MessageReceiver for the supplied test context and
destination |
static MessageReceiver |
createReceiver(TestContext context,
javax.jms.Destination destination,
java.lang.String selector,
boolean noLocal)
Create a MessageReceiver for the supplied test context,
destination, selector, and noLocal flag |
static MessageReceiver |
createReceiver(TestContext context,
javax.jms.Destination destination,
java.lang.String name,
java.lang.String selector,
boolean noLocal)
Create a MessageReceiver for the supplied test context,
destination, name, selector, and noLocal flag |
static MessageSender |
createSender(javax.jms.Session session,
javax.jms.Destination destination,
MessagingBehaviour behaviour)
Create a MessageSender for the supplied session, destination
and behaviour |
static MessageSender |
createSender(TestContext context,
javax.jms.Destination destination)
Create a MessageSender for the supplied test context |
static java.lang.String |
getSubscriberName()
Return a unique name for a durable subscriber |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static javax.jms.MessageConsumer createConsumer(javax.jms.Session session, javax.jms.Destination destination, java.lang.String name) throws javax.jms.JMSException
session
- the sessiondestination
- the destination to consume messages fromname
- if non-null, and the session is a TopicSession, then a
durable subscriber will be returned, otherwise the argument is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static javax.jms.MessageConsumer createConsumer(javax.jms.Session session, javax.jms.Destination destination, java.lang.String name, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
session
- the sessiondestination
- the destination to consume messages fromname
- if non-null, and the session is a TopicSession, then a
durable subscriber will be returned, otherwise the argument is ignored.selector
- the message selectornoLocal
- if the session is a TopicSession, then the subscriber
will be created with the supplied noLocal flag, otherwise the argument
is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static javax.jms.MessageProducer createProducer(javax.jms.Session session, javax.jms.Destination destination) throws javax.jms.JMSException
session
- the test sessiondestination
- the destination to send messages tojavax.jms.JMSException
- if any of the JMS operations failpublic static javax.jms.MessageConsumer createConsumer(TestContext context, javax.jms.Destination destination, java.lang.String name) throws javax.jms.JMSException
context
- the test contextdestination
- the destination to consume messages fromname
- if non-null, and the session is a TopicSession, then a
durable subscriber will be returned, otherwise the argument is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static javax.jms.MessageProducer createProducer(TestContext context, javax.jms.Destination destination) throws javax.jms.JMSException
context
- the test contextdestination
- the destination to send messages tojavax.jms.JMSException
- if any of the JMS operations failpublic static MessageReceiver createReceiver(javax.jms.Session session, javax.jms.Destination destination, MessagingBehaviour behaviour) throws javax.jms.JMSException
MessageReceiver
for the supplied session, destination,
and messaging behavioursession
- the sessiondestination
- the destination to consume messages frombehaviour
- the messaging behaviourjavax.jms.JMSException
- if any of the JMS operations failpublic static MessageReceiver createReceiver(javax.jms.Session session, javax.jms.Destination destination, MessagingBehaviour behaviour, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
MessageReceiver
for the supplied session, destination,
messaging behaviour, and selectorsession
- the sessiondestination
- the destination to consume messages frombehaviour
- the messaging behaviourselector
- the message selectornoLocal
- if the session is a TopicSession, then the subscriber
will be created with the supplied noLocal flag, otherwise the argument
is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static MessageReceiver createReceiver(javax.jms.Session session, javax.jms.Destination destination, MessagingBehaviour behaviour, java.lang.String name, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
MessageReceiver
for the supplied session, destination,
messaging behaviour, and selectorsession
- the sessiondestination
- the destination to consume messages frombehaviour
- the messaging behaviourname
- if non-null, and the session is a TopicSession, then a
durable subscriber will be returned, otherwise the argument is ignored.
If null, and the session is a TopicSession and the behaviour is for
durable subscribers, then a name will be automatically allocated.selector
- the message selectornoLocal
- if the session is a TopicSession, then the subscriber
will be created with the supplied noLocal flag, otherwise the argument
is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static MessageReceiver createReceiver(TestContext context, javax.jms.Destination destination) throws javax.jms.JMSException
MessageReceiver
for the supplied test context and
destinationcontext
- the test contextdestination
- the destination to consume messages fromjavax.jms.JMSException
- if any of the JMS operations failpublic static MessageReceiver createReceiver(TestContext context, javax.jms.Destination destination, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
MessageReceiver
for the supplied test context,
destination, selector, and noLocal flagcontext
- the test contextdestination
- the destination to consume messages fromselector
- the message selectornoLocal
- if the session is a TopicSession, then the subscriber
will be created with the supplied noLocal flag, otherwise the argument
is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static MessageReceiver createReceiver(TestContext context, javax.jms.Destination destination, java.lang.String name, java.lang.String selector, boolean noLocal) throws javax.jms.JMSException
MessageReceiver
for the supplied test context,
destination, name, selector, and noLocal flagcontext
- the test contextdestination
- the destination to consume messages fromname
- if non-null, and the session is a TopicSession, then a
durable subscriber will be returned, otherwise the argument is ignored.
If null, and the session is a TopicSession and the behaviour is for
durable subscribers, then a name will be automatically allocated.selector
- the message selectornoLocal
- if the session is a TopicSession, then the subscriber
will be created with the supplied noLocal flag, otherwise the argument
is ignored.javax.jms.JMSException
- if any of the JMS operations failpublic static MessageSender createSender(javax.jms.Session session, javax.jms.Destination destination, MessagingBehaviour behaviour) throws javax.jms.JMSException
MessageSender
for the supplied session, destination
and behavioursession
- the sesssiondestination
- the destination to send messages tobehaviour
- the messaging behaviourjavax.jms.JMSException
- if any of the JMS operations failpublic static MessageSender createSender(TestContext context, javax.jms.Destination destination) throws javax.jms.JMSException
MessageSender
for the supplied test contextcontext
- the test contextdestination
- the destination to send messages tojavax.jms.JMSException
- if any of the JMS operations failpublic static java.lang.String getSubscriberName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |