Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
HydraExpress Web Service Development Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

13.2 The Asynchronous API

All generated proxies contain both synchronous or asynchronous service operation methods. When you use the proxy, you simply select either the synchronous or the asynchronous method.

The asynchronous methods return an instance of rwsf::AsyncHandle. This class launches a thread which runs the operation, and the response blocks until it is ready. While the method is running, the main thread does not block and is free to perform other tasks.

An asynchronous client can make multiple asynchronous calls on the proxy. Each call uses a single transport with a single connection to the server. This design gives you full control over transport creation and avoids the case in which multiple transports are created automatically outside of your control. However, your client must wait for the transport to return from a previous operation before the next one is sent to the server.

To achieve full asynchronous behavior, you may want to create separate proxies, so that each one has its own connection to the server.

The asynchronous class architecture is illustrated in Figure 7.

Figure 7: Architecture for asynchronous clients

13.2.1 Using the Asynchronous API

For each operation defined in the WSDL, the code generator creates five service operation methods to choose from when implementing the client. These include:



Previous fileTop of DocumentContentsIndex pageNext file

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