public class DestinationManager extends Object implements Serializable
DestinationManager can be used
to create queues and topics, which is normally an
administrative act. Since queues and topics are ususally
acquired using JNDI in a J2EE environment, you can bind
the created objects to the mock context with the help
of com.mockrunner.ejb.EJBTestModule#bindToContext.| Constructor and Description |
|---|
DestinationManager() |
| Modifier and Type | Method and Description |
|---|---|
MockQueue |
createQueue(String name)
Creates a new
Queue that is available
for MockSession.createQueue(java.lang.String)
calls. |
MockTopic |
createTopic(String name)
Creates a new
Topic that is available
for MockSession.createTopic(java.lang.String)
calls. |
boolean |
existsQueue(String queueName) |
boolean |
existsTopic(String topicName) |
MockQueue |
getQueue(String name)
Returns a
Queue that was created with
createQueue(java.lang.String), or creates one if it didn't exist yet. |
MockTopic |
getTopic(String name)
Returns a
Topic that was created with
createTopic(java.lang.String), or creates one if it didn't exist yet. |
void |
removeQueue(String name)
Removes a formerly created
Queue. |
void |
removeTopic(String name)
Removes a formerly created
Topic. |
public MockQueue createQueue(String name)
Queue that is available
for MockSession.createQueue(java.lang.String)
calls. Creating queues is an administrative act.
Before MockSession.createQueue(java.lang.String)
can be sucessfully called, you have to create a Queue
with this method. You can also bind the created queue to the
mock JNDI context using com.mockrunner.ejb.EJBTestModule#bindToContext.name - the name of the QueueQueuepublic void removeQueue(String name)
Queue.name - the name of the Queuepublic MockQueue getQueue(String name)
Queue that was created with
createQueue(java.lang.String), or creates one if it didn't exist yet.name - the name of the QueueQueuepublic MockTopic createTopic(String name)
Topic that is available
for MockSession.createTopic(java.lang.String)
calls. Creating topics is an administrative act.
Before MockSession.createTopic(java.lang.String)
can be sucessfully called, you have to create a Topic
with this method. You can also bind the created topic to the
mock JNDI context using com.mockrunner.ejb.EJBTestModule#bindToContext.name - the name of the TopicTopicpublic void removeTopic(String name)
Topic.name - the name of the Topicpublic MockTopic getTopic(String name)
Topic that was created with
createTopic(java.lang.String), or creates one if it didn't exist yet.name - the name of the TopicTopicpublic boolean existsTopic(String topicName)
public boolean existsQueue(String queueName)
Copyright © 2003–2020. All rights reserved.