Name

TopicRequestor

Synopsis

The TopicRequestor is a utility class provided for situations where a client wants to send a message to a specific Topic and wait for a response. The TopicRequestor is constructed with a TopicSession and a destination Topic, and then its request() method is called with the Message to be sent. The TopicRequestor sets the reply-to destination on the message to a temporary Topic that it creates. It sends the message and waits for a response. The response Message is the return value of the request() method.

public class TopicRequestor {
// Public Constructors
   public TopicRequestor(TopicSession session, 
        Topic topic) throws JMSException;  
// Public Instance Methods
   public void close() throws JMSException;  
   public javax.jms.Message request(
        javax.jms.Message message) throws JMSException;  
}

Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.