Bug 449827 - Changes to client API for sync/async commands
Changes to client API for sync/async commands
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: Release_Notes (Show other bugs)
beta
All Linux
medium Severity high
: ---
: ---
Assigned To: Lana Brindley
Kim van der Riet
: Documentation
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-03 15:38 EDT by Alan Conway
Modified: 2013-10-23 19:07 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-06-05 21:57:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alan Conway 2008-06-03 15:38:28 EDT
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-05 21:57:30 EDT
<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>

Note You need to log in before you can comment on or make changes to this bug.