TopicRequestor helper class simplifies making service requests.
The TopicRequestor constructor is given a non-transacted TopicSession and a destination
Topic. It creates a TemporaryTopic for the responses and provides a request method that sends
the request message and waits for its reply.
This is a very basic request/reply abstraction which assumes the session is non-transacted with a delivery mode of either AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE. It is expected that most applications will create less basic implementations.
jakarta.jms.QueueRequestor
| Modifier and Type | Field and Description |
|---|---|
| pack-priv TopicPublisher | |
| pack-priv TopicSession | |
| pack-priv TopicSubscriber | |
| pack-priv TemporaryTopic |
| Access | Constructor and Description |
|---|---|
| public | TopicRequestor(TopicSession
the session, Topic TopicSession the topic belongs tothe topic to perform the request/reply call on topic)Constructor for the |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Message |
| publisher | back to summary |
|---|---|
| pack-priv TopicPublisher publisher | |
| session | back to summary |
|---|---|
| pack-priv TopicSession session | |
| subscriber | back to summary |
|---|---|
| pack-priv TopicSubscriber subscriber | |
| tempTopic | back to summary |
|---|---|
| pack-priv TemporaryTopic tempTopic | |
| TopicRequestor | back to summary |
|---|---|
| public TopicRequestor(TopicSession session, Topic topic) throws JMSException Constructor for the
This implementation assumes the session parameter to be non-transacted, with a delivery mode of either
| |
| close | back to summary |
|---|---|
| public void close() throws JMSException Closes the
Since a provider may allocate some resources on behalf of a
Note that this method closes the
| |
| request | back to summary |
|---|---|
| public Message request(Message message) throws JMSException Sends a request and waits for a reply. The temporary topic is used for the
| |