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

javax::jms::QueueRequestor Class Reference

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

#include <javax_jms_QueueRequestor.h>

Inheritance diagram for javax::jms::QueueRequestor:

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

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::QueueRequestor
array1D
typedef ::xmog_java_array_template<
::xmog_java_array_template<
::javax::jms::QueueRequestor > > 
array2D

Public Member Functions

virtual void close (::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Closes the QueueRequestor and its session.
 QueueRequestor (const ::javax::jms::QueueSession &session, const ::javax::jms::Queue &queue,::xmog_localenv *p_xenv=NULL, xmog_flags f_xflags=xmogDefaultFlags)
 Constructor for the QueueRequestor class.
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.

Detailed Description

The QueueRequestor helper class simplifies making service requests.

The QueueRequestor constructor is given a non-transacted QueueSession and a destination Queue. It creates a TemporaryQueue 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::QueueRequestor::QueueRequestor const ::javax::jms::QueueSession session,
const ::javax::jms::Queue queue,
::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
 

Constructor for the QueueRequestor 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 QueueSession the queue belongs to
queue the queue 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::QueueRequestor::close ::xmog_localenv p_xenv = NULL,
xmog_flags  f_xflags = xmogDefaultFlags
[virtual]
 

Closes the QueueRequestor and its session.

Since a provider may allocate some resources on behalf of a QueueRequestor 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 QueueSession object passed to the QueueRequestor 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::QueueRequestor::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 queue is used for the JMSReplyTo destination, and only one reply per request is expected.

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:19:57 2006 for JMS Courier for C++ by  doxygen 1.4.1