HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
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 (BodyBase *body)
 HandleBase (const HandleBase &second)
 HandleBase (StaticCtor)
 HandleBase (void)
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
Represents an asynchronous operation in the generated proxy classes.
Definition AsyncHandle.h:123
Holds all data for a given message, such as session or transaction data, SOAP headers,...
Definition CallInfo.h:75
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

◆ AsyncHandle() [1/2]

rwsf::AsyncHandle::AsyncHandle ( )

Default constructor. Constructs an empty handle.

◆ AsyncHandle() [2/2]

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

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

◆ ~AsyncHandle()

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

◆ getCallInfo()

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).

◆ join()

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.

◆ operator=()

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

Assignment operator.

Copyright © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.