Bug 449827

Summary: Changes to client API for sync/async commands
Product: Red Hat Enterprise MRG Reporter: Alan Conway <aconway>
Component: Release_NotesAssignee: Lana Brindley <lbrindle>
Status: CLOSED CURRENTRELEASE QA Contact: Kim van der Riet <kim.vdriet>
Severity: high Docs Contact:
Priority: medium    
Version: betaCC: mhideo
Target Milestone: ---Keywords: Documentation
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 1.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-06 01:57:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alan Conway 2008-06-03 19:38:28 UTC
Release Note: 

The C++ client API has changed with regard to synchronous and asynchronous
calls. The client::Sesssion class has been modified, and a new class
client::AsyncSession has been added.

The new client::Session class provides _synchronous_ functions corresponding to
AMQP commands. The functions block until the command is completed by the broker
and return a C++ result object (or void if no result is expected.)

The client::AsyncSession class provides _asynchronous_ functions for the AMQP
commands. These functions send the command and return immediately. They return a
Future object that can be used to wait for the command to complete and retrieve
the result.

The names and parameter lists of the functions on client::Session and
client::AsyncSession are identical, only the return types differ. The functions
async() and sync() can be used to convert a Session to an AsyncSession and vice
versa.

CHANGES TO EXISTING CODE:

1. qpid::client::Connection.newSession() no longer takes SYNC/ASYNC argument:

Connection c;
// old
Session s = c.newSession(SYNC); 
Session  as = c.newSession(ASYNC);
// new
Session s = c.newSession(); 
AsyncSession as = c.newSession(); 

2. Use sync()/async() conversion functions instead of old
Session::setSynchronous() function.

// old
s.setSynchronous(false);
s.messageTransfer(...); 

// new
async(s).messageTransfer(...);
 OR
AsyncSession as = async(s);
as.messageTransfer(...);

Comment 1 Lana Brindley 2008-06-06 01:57:30 UTC
<row>
						<entry>
							449827
						</entry>
						<entry>
							The C++ client API has changed with regard to synchronous and
asynchronous calls. The <command>client::Sesssion</command> class has been
modified. The new <command>client::Session</command> class provides synchronous
functions corresponding to AMQP commands. The functions block until the command
is completed by the broker and return a C++ result object (or void if no result
is expected.)
						</entry>
						<entry>The names and parameter lists of the functions on
<command>client::AsyncSession</command> are identical, only the return types
differ. The functions <command>async()</command> and <command>sync()</command>
can be used to convert a Session to an AsyncSession and vice versa.
						</entry>
					</row>
					<row>
						<entry>
							449827
						</entry>
						<entry>
							The C++ client API has changed with regard to synchronous and
asynchronous calls. A new class <command>client::AsyncSession</command> has been
added. The <command>client::AsyncSession</command> class provides asynchronous
functions for the AMQP commands. These functions send the command and return
immediately. They return a Future object that can be used to wait for the
command to complete and retrieve the result.
						</entry>
						<entry>
							The names and parameter lists of the functions on
<command>client::AsyncSession</command> are identical, only the return types
differ. The functions <command>async()</command> and <command>sync()</command>
can be used to convert a Session to an AsyncSession and vice versa.
						</entry>
					</row>