HydraExpress™ C++ API Reference Guide

Product Documentation:
   HydraExpress C++
Documentation Home
List of all members | Public Member Functions
rwsf::AsyncHandle Class Reference

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

#include <rwsf/webservice/AsyncHandle.h>

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

Public Member Functions

 AsyncHandle ()
 
 AsyncHandle (const AsyncHandle &handle)
 
 ~AsyncHandle ()
 
virtual rwsf::CallInfo getCallInfo () const
 
virtual void join ()
 
AsyncHandleoperator= (const AsyncHandle &obj)
 
- Public Member Functions inherited from rwsf::HandleBase
bool isValid (void) const
 
bool operator!= (const HandleBase &second) const
 
bool operator== (const HandleBase &second) const
 

Additional Inherited Members

- Protected Member Functions inherited from rwsf::HandleBase
 HandleBase (void)
 
 HandleBase (StaticCtor)
 
 HandleBase (BodyBase *body)
 
 HandleBase (const HandleBase &second)
 
virtual ~HandleBase (void)
 
BodyBase & body (void) const
 
HandleBaseoperator= (const HandleBase &second)
 

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 © 2020 Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is registered trademark of Rogue Wave Software, Inc. in the United States and other countries, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.