|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.qpid.test.utils.ConversationFactory.Conversation
public class ConversationFactory.Conversation
Used to hold a conversation context. This consists of a correlating id for the conversation, and a reply destination automatically updated to the last received reply-to destination.
Field Summary | |
---|---|
(package private) long |
conversationId
Holds the correlation id for the context. |
(package private) Destination |
sendDestination
Holds the send destination for the context. |
Constructor Summary | |
---|---|
ConversationFactory.Conversation()
|
Method Summary | |
---|---|
void |
end()
Completes the conversation. |
Message |
receive()
Gets the next message in an ongoing conversation. |
Collection<Message> |
receiveAll(int num,
long timeout)
Gets many messages in an ongoing conversation. |
void |
send(Destination sendDestination,
Message message)
Sends a message to the default sending location. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
long conversationId
Destination sendDestination
Constructor Detail |
---|
public ConversationFactory.Conversation()
Method Detail |
---|
public void send(Destination sendDestination, Message message) throws JMSException
sendDestination
- The destination to send to. This may be null to use the last received reply-to
destination.message
- The message to send.
JMSException
- All undelying JMSExceptions are allowed to fall through. This will also be thrown if no
send destination is specified and there is no most recent reply-to destination available
to use.public Message receive() throws JMSException
JMSException
- All undelying JMSExceptions are allowed to fall through. Thrown if the received message
did not have its reply-to destination set up.public Collection<Message> receiveAll(int num, long timeout) throws JMSException
num
- The number of messages to receive, or all if this is less than 1.timeout
- The timeout in milliseconds to receive the messages in, or forever if this is less than 1.
JMSException
- All undelying JMSExceptions are allowed to fall through.public void end()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |