|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.jms.DestinationManager
public class DestinationManager
The 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 EJBTestModule.bindToContext(java.lang.String, java.lang.Object)
.
Constructor Summary | |
---|---|
DestinationManager()
|
Method Summary | |
---|---|
MockQueue |
createQueue(java.lang.String name)
Creates a new Queue that is available
for MockSession.createQueue(java.lang.String)
calls. |
MockTopic |
createTopic(java.lang.String name)
Creates a new Topic that is available
for MockSession.createTopic(java.lang.String)
calls. |
MockQueue |
getQueue(java.lang.String name)
Returns a Queue that was created with
createQueue(java.lang.String) or null if no such
Queue is present. |
MockTopic |
getTopic(java.lang.String name)
Returns a Topic that was created with
createTopic(java.lang.String) or null if no such
Topic is present. |
void |
removeQueue(java.lang.String name)
Removes a formerly created Queue . |
void |
removeTopic(java.lang.String name)
Removes a formerly created Topic . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DestinationManager()
Method Detail |
---|
public MockQueue createQueue(java.lang.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 EJBTestModule.bindToContext(java.lang.String, java.lang.Object)
.
name
- the name of the Queue
Queue
public void removeQueue(java.lang.String name)
Queue
.
name
- the name of the Queue
public MockQueue getQueue(java.lang.String name)
Queue
that was created with
createQueue(java.lang.String)
or null
if no such
Queue
is present.
name
- the name of the Queue
Queue
public MockTopic createTopic(java.lang.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 EJBTestModule.bindToContext(java.lang.String, java.lang.Object)
.
name
- the name of the Topic
Topic
public void removeTopic(java.lang.String name)
Topic
.
name
- the name of the Topic
public MockTopic getTopic(java.lang.String name)
Topic
that was created with
createTopic(java.lang.String)
or null
if no such
Topic
is present.
name
- the name of the Topic
Topic
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |