rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::AsyncHandle Class Reference
[Web Services]

Represents an asynchronous operation in the generated proxy classes. More...

#include <rwsf/webservice/AsyncHandle.h>

Inheritance diagram for rwsf::AsyncHandle:
rwsf::HandleBase

List of all members.

Public Member Functions

 AsyncHandle ()
 AsyncHandle (const AsyncHandle &handle)
 ~AsyncHandle ()
AsyncHandleoperator= (const AsyncHandle &obj)
virtual void join ()
virtual rwsf::CallInfo getCallInfo () const

Detailed Description

rwsf::AsyncHandle is used to represent an asynchronous operation. An instance of this class is a reference returned by an asynchronous Start() method and required for an asynchronous End() method.

Generated proxies include both synchronous and asynchronous versions of each service operation method. Depending on the needs of your client, use either the synchronous method or the asynchronous method.

For example, following is an excerpt of the generated service operation methods for the example DayofWeek, reformatted slightly to make it more readable:

 // Synchronous operation method for getDayofWeek
 RWCString  getDayOfWeek(const RWDate& date_in);                //1
 RWCString  getDayOfWeek(rwsf::CallInfo& callInfo, const RWDate& date_in);

 // Asynchronous operation methods for getDayofWeek
 rwsf::AsyncHandle getDayOfWeekStart(const RWDate& date_in);    //2
 rwsf::AsyncHandle getDayOfWeekStart(const rwsf::CallInfo& callInfo,
 const RWDate& date_in);
 RWCString getDayOfWeekEnd(rwsf::AsyncHandle& handle);          //3
Note:
This class uses reference semantics in which an instance of this class represents a reference to an implementation class.

For information on asynchronous processing, see the Web Service Development Guide.


Constructor & Destructor Documentation

rwsf::AsyncHandle::AsyncHandle (  ) 

Default constructor. Constructs an empty handle.

rwsf::AsyncHandle::AsyncHandle ( const AsyncHandle handle  ) 

Copy constructor. Creates a new handle and increments a reference count.

rwsf::AsyncHandle::~AsyncHandle (  ) 

Destructor. Detaches from the current body (if any), decrements its reference count, and deletes it and its thread if there are no other references.


Member Function Documentation

virtual rwsf::CallInfo rwsf::AsyncHandle::getCallInfo (  )  const [virtual]

Returns a copy of the rwsf::CallInfo object instance associated with the asynchronous operation. When the operation has completed, this object will hold properties of the response message (such as transport and SOAP headers).

virtual void rwsf::AsyncHandle::join (  )  [virtual]

Joins the thread. Throws an rwsf::Exception "Invalid Async Handler" if the thread cannot be found. Use this method to complete an asynchronous operation without having to call the specific [operation]End() method. This is useful if there is no data to retrieve, or you don't care about returned data.

AsyncHandle& rwsf::AsyncHandle::operator= ( const AsyncHandle obj  ) 

Assignment operator.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.