|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.jms.TopicTransmissionManager
public class TopicTransmissionManager
This class is used to create topic publishers and subscribers. It can be also used to access all created classes in tests.
Constructor Summary | |
---|---|
TopicTransmissionManager(MockConnection connection,
MockSession session)
|
Method Summary | |
---|---|
void |
closeAll()
Closes all senders, receivers, browsers, publishers and subscribers. |
void |
closeAllTopicDurableSubscribers()
Closes all durable topic subscribers. |
void |
closeAllTopicPublishers()
Closes all topic publishers. |
void |
closeAllTopicSubscribers()
Closes all topic subscribers. |
MockTopicSubscriber |
createDurableTopicSubscriber(MockTopic topic,
java.lang.String name,
java.lang.String messageSelector,
boolean noLocal)
Creates a new durable TopicSubscriber for the specified
Topic . |
MockTopicPublisher |
createTopicPublisher(MockTopic topic)
Creates a new TopicPublisher for the specified
Topic . |
MockTopicSubscriber |
createTopicSubscriber(MockTopic topic,
java.lang.String messageSelector,
boolean noLocal)
Creates a new TopicSubscriber for the specified
Topic . |
MockTopicSubscriber |
getDurableTopicSubscriber(java.lang.String name)
Returns a durable TopicSubscriber by its name or
null , if no such durable TopicSubscriber is
present. |
java.util.Map |
getDurableTopicSubscriberMap()
Returns the map of all durable TopicSubscriber objects. |
java.util.Map |
getDurableTopicSubscriberMap(java.lang.String topicName)
Returns the map of all durable TopicSubscriber objects
for a specific Topic . |
MockTopicPublisher |
getTopicPublisher(int index)
Returns a TopicPublisher by its index or
null , if no such TopicPublisher is
present. |
MockTopicPublisher |
getTopicPublisher(java.lang.String topicName)
Returns a TopicPublisher by the name of its
corresponding Topic . |
java.util.List |
getTopicPublisherList()
Returns the list of all TopicPublisher objects. |
java.util.List |
getTopicPublisherList(java.lang.String topicName)
Returns the list of the TopicPublisher objects
for a specific Topic . |
MockTopicSubscriber |
getTopicSubscriber(int index)
Returns a TopicSubscriber by its index or
null , if no such TopicSubscriber is
present. |
MockTopicSubscriber |
getTopicSubscriber(java.lang.String topicName)
Returns a TopicSubscriber by the name of its
corresponding Topic . |
java.util.List |
getTopicSubscriberList()
Returns the list of all TopicSubscriber objects. |
java.util.List |
getTopicSubscriberList(java.lang.String topicName)
Returns the list of the TopicSubscriber objects
for a specific Topic . |
void |
removeTopicDurableSubscriber(java.lang.String name)
Deletes a durable TopicSubscriber . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TopicTransmissionManager(MockConnection connection, MockSession session)
Method Detail |
---|
public void closeAll()
public void closeAllTopicPublishers()
public void closeAllTopicSubscribers()
public void closeAllTopicDurableSubscribers()
public MockTopicPublisher createTopicPublisher(MockTopic topic)
TopicPublisher
for the specified
Topic
. Usually this method is called
by MockTopicSession.createPublisher(javax.jms.Topic)
.
topic
- the Topic
TopicPublisher
public MockTopicPublisher getTopicPublisher(int index)
TopicPublisher
by its index or
null
, if no such TopicPublisher
is
present.
index
- the index of the TopicPublisher
TopicPublisher
public MockTopicPublisher getTopicPublisher(java.lang.String topicName)
TopicPublisher
by the name of its
corresponding Topic
. If there's more than
one TopicPublisher
object for the specified name,
the first one will be returned.
topicName
- the name of the Topic
TopicPublisher
public java.util.List getTopicPublisherList(java.lang.String topicName)
TopicPublisher
objects
for a specific Topic
.
topicName
- the name of the Topic
TopicPublisher
objectspublic java.util.List getTopicPublisherList()
TopicPublisher
objects.
TopicPublisher
objectspublic MockTopicSubscriber createTopicSubscriber(MockTopic topic, java.lang.String messageSelector, boolean noLocal)
TopicSubscriber
for the specified
Topic
. Usually this method is called
by MockTopicSession.createSubscriber(javax.jms.Topic)
.
topic
- the Topic
messageSelector
- the message selectornoLocal
- the no local flag
TopicSubscriber
public MockTopicSubscriber getTopicSubscriber(int index)
TopicSubscriber
by its index or
null
, if no such TopicSubscriber
is
present.
index
- the index of the TopicSubscriber
TopicSubscriber
public MockTopicSubscriber getTopicSubscriber(java.lang.String topicName)
TopicSubscriber
by the name of its
corresponding Topic
. If there's more than
one TopicSubscriber
object for the specified name,
the first one will be returned.
topicName
- the name of the Topic
TopicSubscriber
public java.util.List getTopicSubscriberList(java.lang.String topicName)
TopicSubscriber
objects
for a specific Topic
.
topicName
- the name of the Topic
TopicSubscriber
objectspublic java.util.List getTopicSubscriberList()
TopicSubscriber
objects.
TopicSubscriber
objectspublic MockTopicSubscriber createDurableTopicSubscriber(MockTopic topic, java.lang.String name, java.lang.String messageSelector, boolean noLocal)
TopicSubscriber
for the specified
Topic
. Usually this method is called
by MockSession.createDurableSubscriber(javax.jms.Topic, java.lang.String)
.
topic
- the Topic
name
- the name of the subscriptionmessageSelector
- the message selectornoLocal
- the no local flag
TopicSubscriber
public MockTopicSubscriber getDurableTopicSubscriber(java.lang.String name)
TopicSubscriber
by its name or
null
, if no such durable TopicSubscriber
is
present.
name
- the name of the subscription
TopicSubscriber
public void removeTopicDurableSubscriber(java.lang.String name)
TopicSubscriber
.
name
- the name of the subscriptionpublic java.util.Map getDurableTopicSubscriberMap(java.lang.String topicName)
TopicSubscriber
objects
for a specific Topic
.
topicName
- the name of the Topic
TopicSubscriber
objectspublic java.util.Map getDurableTopicSubscriberMap()
TopicSubscriber
objects.
TopicSubscriber
objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |