Package javax.jms
Class TopicRequestor
- java.lang.Object
-
- javax.jms.TopicRequestor
-
public class TopicRequestor extends java.lang.Object
Provides a basic request/reply layer ontop of JMS. Pass the constructor details of the session/topic to send requests upon. Then call the request method to send a request. The method will block until the reply is received.- Version:
- $Revision$
-
-
Field Summary
Fields Modifier and Type Field Description private TopicPublisher
requestPublisher
private TopicSubscriber
responseSubscriber
private TemporaryTopic
responseTopic
private TopicSession
topicSession
-
Constructor Summary
Constructors Constructor Description TopicRequestor(TopicSession session, Topic topic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Message
request(Message message)
-
-
-
Field Detail
-
topicSession
private TopicSession topicSession
-
requestPublisher
private TopicPublisher requestPublisher
-
responseTopic
private TemporaryTopic responseTopic
-
responseSubscriber
private TopicSubscriber responseSubscriber
-
-
Constructor Detail
-
TopicRequestor
public TopicRequestor(TopicSession session, Topic topic) throws JMSException
- Throws:
JMSException
-
-
Method Detail
-
request
public Message request(Message message) throws JMSException
- Throws:
JMSException
-
close
public void close() throws JMSException
- Throws:
JMSException
-
-