Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

javax::jms::TopicRequestor Class Reference

The TopicRequestor helper class simplifies making service requests. More...

#include <javax_jms_TopicRequestor.h>

Inheritance diagram for javax::jms::TopicRequestor:

Inheritance graph
[legend]
Collaboration diagram for javax::jms::TopicRequestor:

Collaboration graph
[legend]
List of all members.

Public Types

enum  {
  xmogDefaultFlags = xmog_base::GLOBAL, xmogMajorVersion = 3, xmogMinorVersion = 2, xmogPatchVersion = 9,
  xmogBuildNumber = 2047
}
typedef ::xmog_java_array_template<
::javax::jms::TopicRequestor
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::javax::jms::TopicRequestor > > 
array2D

Public Member Functions

virtual void close (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Closes the TopicRequestor and its session.
virtual ::javax::jms::Message request (const ::javax::jms::Message &message,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Sends a request and waits for a reply.
 TopicRequestor (const ::javax::jms::TopicSession &session, const ::javax::jms::Topic &topic,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Constructor for the TopicRequestor class.

Detailed Description

The 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 basic request/reply abstraction that should be sufficient for most uses. JMS providers and clients are free to create more sophisticated versions.

Author:
Mark Hapner

Rich Burridge


Constructor & Destructor Documentation

javax::jms::TopicRequestor::TopicRequestor const ::javax::jms::TopicSession session,
const ::javax::jms::Topic topic,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Constructor for the TopicRequestor class.

This implementation assumes the session parameter to be non-transacted, with a delivery mode of either AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE.

Parameters:
session the TopicSession the topic belongs to
topic the topic to perform the request/reply call on
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.


Member Function Documentation

virtual void javax::jms::TopicRequestor::close ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Closes the TopicRequestor and its session.

Since a provider may allocate some resources on behalf of a TopicRequestor outside the Java virtual machine, clients should close them when they are not needed. Relying on garbage collection to eventually reclaim these resources may not be timely enough.

Note that this method closes the TopicSession object passed to the TopicRequestor constructor.

Parameters:
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:

virtual ::javax::jms::Message javax::jms::TopicRequestor::request const ::javax::jms::Message message,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Sends a request and waits for a reply.

The temporary topic is used for the JMSReplyTo destination; the first reply is returned, and any following replies are discarded.

Parameters:
message the message to send
p_xenv the local call environment. The default value is NULL.
f_xflags the flags that allow control over the reference type and other internal matters. The default value is xmog_base::GLOBAL.
Returns:
the reply message


The documentation for this class was generated from the following file:
Generated on Fri Jun 16 10:20:02 2006 for JMS Courier for C++ by  doxygen 1.4.1