public class MockTopicSubscriber extends MockMessageConsumer implements javax.jms.TopicSubscriber
TopicSubscriber.| Constructor and Description |
|---|
MockTopicSubscriber(MockConnection connection,
MockSession session,
MockTopic topic) |
MockTopicSubscriber(MockConnection connection,
MockSession session,
MockTopic topic,
String messageSelector,
boolean noLocal) |
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Returns the name of the subscription if the subscription
is durable.
|
boolean |
getNoLocal() |
javax.jms.Topic |
getTopic() |
boolean |
isDurable()
Returns if this subscriber is durable.
|
javax.jms.Message |
receive() |
void |
setDurable(boolean isDurable)
Set if this subscriber is durable.
|
void |
setName(String name)
Set the name of the subscription.
|
canConsume, close, getConnection, getMessageFilter, getMessageListener, getMessageSelector, isClosed, receive, receiveMessage, receiveNoWait, setMessageListenerpublic MockTopicSubscriber(MockConnection connection, MockSession session, MockTopic topic)
public MockTopicSubscriber(MockConnection connection, MockSession session, MockTopic topic, String messageSelector, boolean noLocal)
public boolean isDurable()
true if this subscriber is durablepublic void setDurable(boolean isDurable)
isDurable - is this a durable subscriber?public String getName()
null.public void setName(String name)
name - the name of this subscriberpublic javax.jms.Topic getTopic()
throws javax.jms.JMSException
getTopic in interface javax.jms.TopicSubscriberjavax.jms.JMSExceptionpublic boolean getNoLocal()
throws javax.jms.JMSException
getNoLocal in interface javax.jms.TopicSubscriberjavax.jms.JMSExceptionpublic javax.jms.Message receive()
throws javax.jms.JMSException
receive in interface javax.jms.MessageConsumerjavax.jms.JMSExceptionCopyright © 2003-2014. All Rights Reserved.