|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.mock.jms.MockDestination
public abstract class MockDestination
Mock implementation of JMS Destination
.
Constructor Summary | |
---|---|
MockDestination()
|
Method Summary | |
---|---|
protected void |
acknowledgeMessage(javax.jms.Message message,
MockSession session)
|
protected void |
addCurrentMessage(javax.jms.Message message)
|
abstract void |
addMessage(javax.jms.Message message)
Adds a message and delivers it to the corresponding consumers. |
protected void |
addReceivedMessage(javax.jms.Message message)
|
void |
addSession(javax.jms.Session session)
Adds a Session . |
void |
clear()
Clears all current messages. |
java.util.List |
getCurrentMessageList()
Returns a List of all current messages. |
javax.jms.Message |
getMatchingMessage(org.activemq.filter.mockrunner.Filter filter)
Returns the next message that matches the filter. |
javax.jms.Message |
getMessage()
Returns the next message. |
java.util.List |
getReceivedMessageList()
Returns a List of all received messages. |
boolean |
isEmpty()
Returns if this destination contains messages. |
void |
loadMessage(javax.jms.Message message)
Adds a message to the list of current messages in this destination. |
void |
removeSession(javax.jms.Session session)
Removes a Session . |
void |
reset()
Clears all current messages and resets the list of received messages. |
java.util.Set |
sessionSet()
Return a Set of all sessions. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MockDestination()
Method Detail |
---|
public abstract void addMessage(javax.jms.Message message) throws javax.jms.JMSException
MockQueue
and MockTopic
.
message
- the message
javax.jms.JMSException
public void loadMessage(javax.jms.Message message)
message
- the messagepublic boolean isEmpty()
false
if there's at least one message,
true
otherwisepublic void clear()
public void reset()
public javax.jms.Message getMessage()
null
will be returned.
Message
public javax.jms.Message getMatchingMessage(org.activemq.filter.mockrunner.Filter filter)
null
will be returned.
filter
- the message filter
Message
public java.util.List getCurrentMessageList()
List
of all current messages.
List
of messagespublic java.util.List getReceivedMessageList()
List
of all received messages.
List
of messagespublic void addSession(javax.jms.Session session)
Session
.
session
- the sessionpublic void removeSession(javax.jms.Session session)
Session
.
session
- the sessionpublic java.util.Set sessionSet()
Set
of all sessions.
Set
of all sessionsprotected void addReceivedMessage(javax.jms.Message message)
protected void addCurrentMessage(javax.jms.Message message)
protected void acknowledgeMessage(javax.jms.Message message, MockSession session) throws javax.jms.JMSException
javax.jms.JMSException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |