2006-11-13 16:57:51 +00:00
<?xml version='1.0' encoding='iso-8859-1'?>
2007-02-04 04:45:43 +00:00
<!-- $Revision: 1.5 $ -->
2006-11-13 16:57:51 +00:00
<reference id= "ref.sam" >
<title > SAM - Simple Asynchronous Messaging</title>
<titleabbrev > SAM</titleabbrev>
<partintro >
<section id= "sam.intro" >
&reftitle.intro;
<para >
2007-02-04 04:45:43 +00:00
This extension provides access to the functionality of messaging and
queueing systems, such as the IBM WebSphere MQSeries family of products,
from PHP scripts. The interface is designed to make it extremely simple
to do the more commonly required tasks such as deliver simple text
messages to queues while still allowing skilled users to do more complex
messaging operations. For many users the complexities of setting up
numerous options can be simply ignored.
2006-11-13 16:57:51 +00:00
</para>
2007-02-04 04:45:43 +00:00
</section>
2006-11-13 16:57:51 +00:00
<section id= 'sam.installation' >
&reftitle.install;
2006-11-22 17:22:06 +00:00
<section id= 'sam.installation.prerequisites' >
<title > Prerequisites</title>
<para >
2007-02-04 04:45:43 +00:00
The SAM extension interfaces to the IBM Messaging and Queuing
middleware products using a set of libraries and some client side code
referred to as XMS. This package is available as a free download in
the guise of IBM support pack IA94. There is a description of this
package and download links in the article <ulink url= "&url.ibm.ia94;" >
Introducing XMS - The IBM Message Service API</ulink> .
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
If you intend to use SAM to access the Messaging and Queuing
infrastructure within WebSphere MQ then you will also need to have
installed a local MQ queue manager or installed the WebSphere MQ
clients package. The clients package is freely available as a support
pack (<ulink url= "&url.ibm.mqc6;" > MQC6</ulink> ).
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
If you are only aiming to experiment with sending messages to and from
WebSphere Application Server queues using the WebSphere Platform
Messaging protocol (WPM) then you do not need to install the MQC6
package.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
After installing these packages you will need to ensure the XMS binary
and, if you are using it, the MQ client bin directory are included in
the PATH environment variable so that Apache and PHP can find the
dependent .DLLs/libraries.
2006-11-22 17:22:06 +00:00
</para>
</section>
<section id= 'sam.installation.linux' >
<title > Linux installation steps</title>
<para >
2007-02-04 04:45:43 +00:00
The sam extension is supplied as a PECL module, which
you should be able to download and install in one step as follows:
<screen >
< ![CDATA[
2006-11-22 17:22:06 +00:00
pear install sam
]]>
2007-02-04 04:45:43 +00:00
</screen>
(Depending on your php environment, you will probably need to be root
to do this.)
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
Make sure that the module is loaded by PHP, by adding following line
to &php.ini; :
<screen >
< ![CDATA[
2006-11-22 17:22:06 +00:00
extension=sam.so
]]>
2007-02-04 04:45:43 +00:00
</screen>
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
If you cannot use the PEAR installer, you can download the extension
and build it manually:
2006-11-22 17:22:06 +00:00
<screen >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-22 17:22:06 +00:00
pear download sam #downloads sam-<version > .tgz
tar -xzf sam-<version > .tgz
cd sam-<version >
phpize
./configure
make
make install #you may need to be root for this step
]]>
</screen>
</para>
<para >
2007-02-04 04:45:43 +00:00
To work with the very latest source, you'll need to extract it from
cvs and build manually as above.
2006-11-22 17:22:06 +00:00
</para>
</section>
<section id= 'sam.installation.windows' >
<title > Windows installation steps</title>
<para >
2007-02-04 04:45:43 +00:00
Currently you will need to build the sam extension for Windows as
there are no pre-built binaries. The extension can be built using the
standard Windows extension build procedures.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
You will need the PHP source tree for the version of PHP you wish to
build the SAM extension against which you can obtain from php.net.
This should be unpacked into a working directory of your choice.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
You will also need the libraries and headers used by PHP extensions
available from http://www.php.net/extra/win32build.zip and this
should be unzipped so that is in your working directory.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
You should have something like:
2006-11-22 17:22:06 +00:00
<screen >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-22 17:22:06 +00:00
c:\php-build\-
|
|---php-5.0.5--|---build
| |---ext
| |--- ...
|
|---win32build--|---bin
|---include
|---lib
2007-02-04 04:45:43 +00:00
]]>
2006-11-22 17:22:06 +00:00
</screen>
</para>
<para >
2007-02-04 04:45:43 +00:00
You will need a compiler such as the free version of Visual Studio C++
Express from the Microsoft web site. Also you need the Microsoft
Windows Platform SDK which again can be downloaded from the Microsoft web site.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
Obtain the SAM extension source using pear (pear download sam) or by
using CVS and copy the files to a new "sam" directory under the "ext"
directory in your PHP source tree.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
To build the extension open a build environment window by going to the
start menu->all programs->microsoft platform SDK for windows->
open build environment window->windows 200 build environment->
set windows 2000 build environment (retail)
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
This should open a command prompt with all the environment variables
set up to access the platform SDK etc. You then need to set the
environment variables for Visual Studio by issuing the command
"vcvars32.bat" in the window.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
Change directory to your working directory e.g. cd c:\php-build. Then
make sure the win32build tools are accessible by adding them to the
PATH environment variable:
<screen >
< ![CDATA[
2006-11-22 17:22:06 +00:00
set PATH=..\win32build\bin;%PATH%
]]>
2007-02-04 04:45:43 +00:00
</screen>
2006-11-22 17:22:06 +00:00
</para>
2007-02-04 04:45:43 +00:00
<para >
Run the buildconf.bat command. This should rebuild the configure.js
file.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
Run the cscript command:
<screen >
< ![CDATA[
2006-11-22 17:22:06 +00:00
cscript /nologo configure.js --with-sam="c:\program files\ibm\xms"
]]>
2007-02-04 04:45:43 +00:00
</screen>
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
The additional parameter passed for sam is the installation path to
the XMS libraries and runtime that were installed as described under
prerequisites at the top of this file.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
You can specify whatever other cscript parameters you require to
include or exclude items from the php build or select options.
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
Assuming all has gone well so far you can now finally run a make!
<screen >
< ![CDATA[
2006-11-22 17:22:06 +00:00
nmake php_sam.dll
]]>
</screen>
</para>
</section>
<section id= 'sam.installation.VS2005' >
<title > Additional steps for Visual Studio 2005</title>
<para >
2007-02-04 04:45:43 +00:00
If you build the SAM extension with the Microsoft Visual Studio 2005
compiler and tools you need to perform an additional step in the build
process to ensure the <filename > php_sam.dll</filename> is able to link
with the C runtime libraries at runtime. This step includes the
dependancy manifest into the DLL. Switch to the directory where the
<filename > php_sam.dll</filename> has been generated (usually
Release_TS or Debug_TS below the php source directory) and issue the
following magic incantation:
<screen >
< ![CDATA[
2006-11-22 17:22:06 +00:00
mt.exe -manifest php_sam.dll.manifest -outputresource:php_sam.dll;2
]]>
2007-02-04 04:45:43 +00:00
</screen>
2006-11-22 17:22:06 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
If you build the SAM extension using the compiler and libaries from
Microsoft Visual Studio 2005 you will also need to ensure that the
runtime components are installed on the system on which you intend to
use SAM. This can be accomplished by installing Visual Studio 2005 or
by using the freely distributable
<ulink url= "&url.ms.crt;" > runtime package</ulink> .
2006-11-22 17:22:06 +00:00
</para>
</section>
2006-11-13 16:57:51 +00:00
</section> <!-- id=sam.installation -->
<section id= 'sam.usage' >
<title > API Usage</title>
<section id= 'sam.connections' >
<title > Connections</title>
<para >
2007-02-04 04:45:43 +00:00
In order to perform any messaging and queueing functions a connection
must be established with a messaging server by creating a SAMConnection
object and calling its "connect" method, with a set of connection
properties, to connect the PHP script to the messaging server. Until
such time as the SAMConnection object is destroyed the connection
will be maintained and available for use. All SAMConnection objects
are destroyed when the PHP script exits.
2006-11-13 16:57:51 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
A set of default properties may be used in connecting to a messaging
server but as a minimum the PHP script must specify a protocol to be
used.
2006-11-13 16:57:51 +00:00
</para>
<para >
<example >
2006-11-22 17:22:06 +00:00
<title > Creating a connection and connecting to a remote WebSphere MQSeries Messaging Server</title>
2006-11-13 16:57:51 +00:00
<programlisting role= 'php' >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-13 16:57:51 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$conn = new SAMConnection();
$conn->connect(SAM_WMQ, array(SAM_HOST => myhost.mycompany.com,
SAM_PORT => 1506,
SAM_BROKER => mybroker));
2006-11-13 16:57:51 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-11-13 16:57:51 +00:00
</programlisting>
</example>
</para>
<para >
<example >
2006-11-22 17:22:06 +00:00
<title > Creating a connection and connecting to a remote WebSphere Application Server</title>
2006-11-13 16:57:51 +00:00
<programlisting role= 'php' >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-13 16:57:51 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$conn = new SAMConnection();
$conn->connect(SAM_WMQ, array(SAM_ENDPOINTS => 'localhost:7278:BootstrapBasicMessaging',
SAM_BUS => 'Bus1',
SAM_TARGETCHAIN => 'InboundBasicMessaging'));
2006-11-13 16:57:51 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-11-13 16:57:51 +00:00
</programlisting>
</example>
</para>
</section> <!-- id=sam.connections -->
<section id= 'sam.messages' >
<title > Messages</title>
<para >
2007-02-04 04:45:43 +00:00
Messages sent to and received from queues are represented by the
SAMMessage object. The SAMMessage object encapsulates the body of
the message (if one exists) and the header properties associated with
the message. A SAMMessage object is either supplied as a parameter to
a messaging operation or returned as a result.
2006-11-13 16:57:51 +00:00
</para>
<para >
<example >
<title > Creating a message with a simple text body</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-13 16:57:51 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$msg = new SAMMessage('This is a simple text message');
2006-11-13 16:57:51 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-11-13 16:57:51 +00:00
</programlisting>
</example>
</para>
<para >
2007-02-04 04:45:43 +00:00
Messages may have header properties associated with them that provide
control over the transport of the message or further information to the
receiving application. By default message properties are delivered to
the underlying messaging system as strings and in this case they may be
set with the following simple syntax:
2006-11-13 16:57:51 +00:00
</para>
<para >
<example >
<title > Setting a text format property using the default syntax</title>
<programlisting role= "php" >
< ![CDATA[
< ?php
$msg->header->myPropertyName = 'textData';
?>
]]>
</programlisting>
</example>
</para>
<para >
2007-02-04 04:45:43 +00:00
If it is desired to pass type information an alternative syntax may be
used where the value and the type hint are passed in an associative
array:
2006-11-13 16:57:51 +00:00
</para>
<para >
<example >
<title > Setting a property using a type hint</title>
<programlisting role= "php" >
< ![CDATA[
< ?php
2006-11-22 17:22:06 +00:00
$msg->header->myPropertyName = array(3.14159, SAM_FLOAT);
2006-11-13 16:57:51 +00:00
?>
]]>
</programlisting>
</example>
</para>
<para >
Properties may also be extracted from the header of a message.
</para>
<para >
<example >
<title > Retrieving a property from a message header</title>
<programlisting role= "php" >
< ![CDATA[
< ?php
$myProperty = $msg->header->myPropertyName;
?>
]]>
</programlisting>
</example>
</para>
</section> <!-- id=sam.messages -->
<section id= 'sam.operations' >
<title > Messaging operations</title>
<para >
2007-02-04 04:45:43 +00:00
All messaging operations are performed through calls to methods on the
connection object.
To add a message to a queue the "send" method is used, to obtain a
message from a queue the "receive" method is used. Other methods
provide publish and subscribe functionality and control of transaction
boundaries.
2006-11-13 16:57:51 +00:00
</para>
<para >
<example >
<title > Adding a message to a queue and receiving a response</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-13 16:57:51 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$msg = new SAMMessage('This is a simple text message');
$msg->header->SAM_REPLY_TO = 'queue://receive/test';
$correlid = $conn->send('queue://send/test', $msg);
2006-11-13 16:57:51 +00:00
2007-02-04 04:45:43 +00:00
if (!$correlid) {
// The Send failed!
echo "Send failed ($conn->errno) $conn->error";
} else {
$resp = $conn->receive('queue://receive/test', array(SAM_CORRELID => $correlid));
}
2006-11-13 16:57:51 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-11-13 16:57:51 +00:00
</programlisting>
</example>
</para>
</section> <!-- id=sam.operations -->
2006-12-08 17:21:40 +00:00
<section id= 'sam.pubsub' >
<title > Publish/Subscribe and suscriptions to topics</title>
<para >
2007-02-04 04:45:43 +00:00
SAM allows messages to be sent either to queues or, for WebSphere MQ
and WPM, to publish/subscribe topics.
A topic desintation is specified to SAM in the usual way, i.e. in the
form 'topic://fred', rather than the form 'queue://AQUEUE' used for
point to point operation. To use publish/subscribe it is simply
necessary to specify the correct broker name on the SAMConnect
"connect" call and the desired topic in the destination argument to
the SAMConnect "send" and "receive" calls. The PHP interface is
otherwise identical to the point to point model.
2006-12-08 17:21:40 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
By default, SAM creates non-durable subscriptions when using
publish/subscribe. This means that if a client application is
inactive when messages are published to a topic, then it will not
receive them when it subsequently restarted. SAM does also allow
durable subscriptions to be made to topics when using WPM or WebSphere
MQ publish/subscribe. The purpose of these subscriptions is to allow
data to be received by a client application even if that client was not
active at the time the data was published.
2006-12-08 17:21:40 +00:00
</para>
<para >
2007-02-04 04:45:43 +00:00
Durable subscriptions are specified by using the SAMConnect "subscribe"
call. This method takes the destination topic as an input parameter and
returns a subscription identifier that may be used on subsequent
"receive" calls. When the subscription is no longer required the
SAMConnection "unsubscribe" method should be used to delete the
subscription.
2006-12-08 17:21:40 +00:00
</para>
<para >
<example >
<title > Creating a durable subscription to a topic</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-12-08 17:21:40 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$subName = $conn->subscribe('topic://A');
2006-12-08 17:21:40 +00:00
2007-02-04 04:45:43 +00:00
if (!$subName) {
echo "Subscribe failed";
} else {
# Subscribe was OK
// ...
}
2006-12-08 17:21:40 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-12-08 17:21:40 +00:00
</programlisting>
</example>
</para>
<para >
<example >
<title > Subscribing to a topic using a WebSphere Platform Messaging (WPM) server</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-12-08 17:21:40 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$conn = new SAMConnection();
// Note: For pub/sub on WPM, when connecting the name of a messaging engine
// to hold the durable subscription (SAM_WPM_DUR_SUB_HOME) must be specified.
$conn->connect(SAM_WMQ, array(SAM_ENDPOINTS => 'localhost:7278:BootstrapBasicMessaging',
SAM_BUS => 'Bus1',
SAM_TARGETCHAIN => 'InboundBasicMessaging'
SAM_WPM_DUR_SUB_HOME => 'MyMachineNode01.server1-Bus1'));
2006-12-08 17:21:40 +00:00
2007-02-04 04:45:43 +00:00
$subName = $conn->subscribe('topic://A');
2006-12-08 17:21:40 +00:00
2007-02-04 04:45:43 +00:00
if (!$subName) {
echo "Subscribe failed";
} else {
# Subscribe was OK
// ...
}
2006-12-08 17:21:40 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-12-08 17:21:40 +00:00
</programlisting>
</example>
</para>
<para >
<example >
<title > Receiving published data using a durable subscription</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-12-08 17:21:40 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$msg = $conn->receive($subName);
if ($msg) {
echo "Received a message OK";
} else {
echo "The receive failed";
}
2006-11-13 16:57:51 +00:00
2006-12-08 17:21:40 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-12-08 17:21:40 +00:00
</programlisting>
</example>
</para>
<para >
<example >
<title > Deleting a durable subscription to a topic</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-12-08 17:21:40 +00:00
< ?php
2007-02-04 04:45:43 +00:00
if (!$conn->unsubscribe($subName)) {
echo "Unsubscribe failed";
}
2006-12-08 17:21:40 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-12-08 17:21:40 +00:00
</programlisting>
</example>
</para>
</section> <!-- id=sam.pubsub -->
2006-11-13 16:57:51 +00:00
<section id= 'sam.errors' >
<title > Error handling</title>
<para >
2007-02-04 04:45:43 +00:00
All SAMConnection methods that provide access to messaging operations
return &false; if an error occurred in processing the request.
In addition the SAMConnection object has two properties, "errno"
and "error", that provide respectively the error number and
2006-11-13 16:57:51 +00:00
text description of the last error to occur on the connection.
</para>
<para >
<example >
<title > Handling an error from a method that returns no result</title>
<programlisting role= "php" >
< ![CDATA[
< ?php
if (!$conn->commit()) {
// The commit failed!
echo "Commit failed ($conn->errno) $conn->error";
}
?>
]]>
</programlisting>
</example>
</para>
<para >
<example >
<title > Handling an error from a method that returns a result</title>
<programlisting role= "php" >
2007-02-04 04:45:43 +00:00
< ![CDATA[
2006-11-13 16:57:51 +00:00
< ?php
2007-02-04 04:45:43 +00:00
$correlid = $conn->send('queue://send/test', $msg);
2006-11-13 16:57:51 +00:00
2007-02-04 04:45:43 +00:00
if (!$correlid) {
// The Send failed!
echo "Send failed ($conn->errno) $conn->error";
} else {
...
}
2006-11-13 16:57:51 +00:00
?>
2007-02-04 04:45:43 +00:00
]]>
2006-11-13 16:57:51 +00:00
</programlisting>
</example>
</para>
</section> <!-- id=sam.errors -->
</section> <!-- id=sam.usage -->
<!-- class definition section -->
<section id= 'sam.classes' >
&reftitle.classes;
2007-02-04 04:45:43 +00:00
<!-- Connection class -->
2006-11-13 16:57:51 +00:00
<section id= 'sam.class.Connection' >
<title > <classname > SAMConnection</classname> </title>
<para >
Object representing a connection to a Messaging Server
</para>
<section id= 'sam.class.Connection.constructor' >
&reftitle.constructor;
<itemizedlist >
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-constructor' > new SAMConnection</link> - construct a new connection object to allow connection to a messaging infrastructure.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
</itemizedlist>
</section> <!-- id=sam.class.Connection.constructor -->
<section id= 'sam.class.Connection.methods' >
&reftitle.methods;
<itemizedlist >
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-commit' > commit</link>
- a method that commits (successfully completes) an in-flight unit
of work.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-connect' > connect</link>
2006-11-13 16:57:51 +00:00
- a method that connects a PHP script to a messaging server.
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-disconnect' > disconnect</link>
2006-11-13 16:57:51 +00:00
- a method that disconnects a PHP script from a messaging server.
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-isconnected' > isConnected</link>
- a method that checks whether a PHP script is connected to a
messaging server.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-peek' > peek</link>
- a method that receives a message from a queue without removing it
from the queue.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
2006-11-22 17:22:06 +00:00
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-peekall' > peekAll</link>
- a method that receives one or messages from a queue without
removing them from the queue.
2006-11-22 17:22:06 +00:00
</para>
</listitem>
2006-11-13 16:57:51 +00:00
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-receive' > receive</link>
2006-11-13 16:57:51 +00:00
- a method that receives a message from a queue or subscription.
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-remove' > remove</link>
2006-11-13 16:57:51 +00:00
- a method that removes a message from a queue.
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-rollback' > rollback</link>
2006-11-13 16:57:51 +00:00
- a method that cancels (rolls back) an in-flight unit of work.
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-send' > send</link>
2006-11-13 16:57:51 +00:00
- a method that sends a message to a queue or posts to a topic
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-subscribe' > subscribe</link>
2006-11-13 16:57:51 +00:00
- a method that creates a subscription to one or more topics
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-unsubscribe' > unsubscribe</link>
2006-11-13 16:57:51 +00:00
- a method that destroys a subscription to one or more topics
</para>
</listitem>
</itemizedlist>
</section> <!-- id=sam.class.Connection.methods -->
<section id= 'sam.class.Connection.properties' >
&reftitle.properties;
<itemizedlist >
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-errno' > errno</link> - the
numeric error code for the last encountered error on this
connection. This property is set to 0 if the last operation was
successful.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.samconnection-error' > error</link> - the
text description for the last encountered error on this connection
2006-11-13 16:57:51 +00:00
</para>
</listitem>
</itemizedlist>
</section> <!-- id=sam.class.Connection.properties -->
</section> <!-- id=sam.class.Connection -->
<!-- Message class *************************************************** -->
<section id= 'sam.class.Message' >
<title > <classname > SAMMessage</classname> </title>
<para >
Object representing a message to be sent or received
</para>
<section id= 'sam.class.Message.constructor' >
&reftitle.constructor;
<itemizedlist >
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.sammessage-constructor' > new SAMMessage</link> - construct a
2006-11-13 16:57:51 +00:00
new message.
</para>
</listitem>
</itemizedlist>
</section> <!-- id=sam.class.Message.constructor -->
<section id= 'sam.class.Message.properties' >
&reftitle.properties;
<itemizedlist >
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.sammessage-body' > body</link> - the body of
the message.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
<listitem >
<para >
2007-02-04 04:45:43 +00:00
<link linkend= 'function.sammessage-header' > header</link> - the
header properties of the message.
2006-11-13 16:57:51 +00:00
</para>
</listitem>
</itemizedlist>
</section> <!-- id=sam.class.Message.methods -->
</section> <!-- id=sam.class.Message -->
</section> <!-- id=sam.classes -->
<!-- Include the stuff from constants.xml? -->
&reference.sam.constants;
</partintro>
<!-- This seems to create the table of contents -->
&reference.sam.functions;
</reference>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->