rwsf::AsyncHandlerwsf::HandleBase
#include rwsf/webservice/AsyncHandle.h
rwsf::AsyncHandle is used to represent an asynchronous operation. An instance of this class is a handle 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, you 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 \c getDayOfWeek(rwsf::CallInfo& callInfo, <br> const RWDate& date_in); //Asynchronous operation methods for getDayofWeek rwsf::AsyncHandle getDayOfWeekStart(const RWDate& date_in); //2 rwsf::AsyncHandle \c getDayOfWeekStart(const rwsf::CallInfo& callInfo, const RWDate& date_in); RWCString \c getDayOfWeekEnd(rwsf::AsyncHandle& handle); //3
rwsf::AsyncHandle implements the handle/body idiom in which rwsf::AsyncHandle is the handle, and rwsf::AsyncHandleImp is the body. An instance of this class is a handle to a private, reference-counted body. When a handle is copy-constructed, the new handle attaches to the same body as the original. When one handle is assigned to another handle, the handle on the left side detaches from its current body and attaches to the body pointed to by the handle on the right side. Logical operators return truth values based on whether the handles being compared point to the same body instance.
For information on asynchronous processing, see Chapter 13, "Asynchronous Messaging," in the HydraExpress Web Service Development Guide.
Note
Handle methods that just call the corresponding method on the body are described only in the body class. For instance, if the handle class includes a method invoke() that calls the body's corresponding method doInvoke(), that method is documented only in the body class.
AsyncHandle();
Default constructor. Constructs an empty handle.
AsyncHandle(const AsyncHandle & handle);
Copy constructor. Creates a new handle and increments a reference count.
AsyncHandle(AsyncHandleImp * imp);
Constructs a new handle attached to the body imp.
~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.
AsyncHandle & operator=(const AsyncHandle & obj);
Assignment operator.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.