AMQCPP-102 - creating 1.0 tag for cms
git-svn-id: https://svn.apache.org/repos/asf/activemq/activemq-cpp/tags/cms-1.0@531533 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/KEYS b/KEYS
new file mode 100644
index 0000000..8369607
--- /dev/null
+++ b/KEYS
@@ -0,0 +1,102 @@
+pub 1024D/CCD6F801 2006-11-15
+uid Nathan Mittler <nathan.mittler@gmail.com>
+sig 3 CCD6F801 2006-11-15 Nathan Mittler <nathan.mittler@gmail.com>
+sub 2048g/F5B8EA6A 2006-11-15
+sig CCD6F801 2006-11-15 Nathan Mittler <nathan.mittler@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.2.2 (FreeBSD)
+
+mQGiBEVbpV0RBADJcRJLaDaspQfYql0ok3H/8FKeosZ5zuy37QLICwB9wpqXkeGI
+QEemsKV+6Y0Tv9KVVyBDvMOYu8ZKdqTOkodf6Qd85ZcyMPXQpavcdhKnSnux8d4K
+CoPJtNRogomxi1G/haGJnXl5s1WlZ4ME5ijnaF2UbPYP+5flIW2iv0movwCgzOOl
+ImfG9K9kxmHDXyKrmr8stCUD/3z8cyrkhQ47twFwhBzMuSKhfhsZR78L/tfVajjl
+BSDzu4MUORnm7nx/cnMge9b1Kt0bFWpcalIbUQP/iGLQSyG49S77JrKEaxonQhQF
+Z7zXZMPkm1Y54t9KSPtpgRrV0GSObKj9slQ5FYabhoE/6RW+zwPvTDgJftmyCSIQ
+znlMA/4uhhuXoYJo0Jus3o2rqbQfj9dcEdL502BqKz2kITCKr+2U8DBAaY5xVGUW
+ETUmueKHSrZSXDqPkL5QeVMuASJVas7VmTheLXk5Kr+kc5/X5Sl10oCZoqSgx6Lq
+81bjcbMrHvFWLOmQG/E0zM10EOWw6fEVaFZQUz504UStZm7JqrQpTmF0aGFuIE1p
+dHRsZXIgPG5hdGhhbi5taXR0bGVyQGdtYWlsLmNvbT6IYAQTEQIAIAUCRVulXQIb
+AwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEMGEfSvM1vgBX+AAnRQbwrVjW+P+
+6ERiJ1ezS8EjJsgXAJ97jIS7CVD+DKp5u4gS4SfidmsxNLkCDQRFW6ViEAgA7ytH
+Cl5uvL7SMuOdt9YRZyR7QkhfgBkkJhIUk2MyKqZ/zXhTS9Qgx/D7ulS4auUjdRNe
+YzzuiFhv5qQS/KQB4Bi+FbvxisaR8fh9Yt+8cHZdUiDHhI49c/qhxyJea1ByJ3AP
+Clyr2aCEYLRb+475rYzp43rQLb7SqboWG4ajVmeEQTPqWwM77XqnTTOyTs4MZEJs
+ZO5by+ud23VOG7EF5VL5l8kgNzN8+HHk0q8KU9G0Cir4XMi8vtMtPqXsDSDTsyQU
+Lu9pEdMznY4m4ozFdnT1vxvy5bfoXtfhYNG+161MZbikuEwcLVknXB5fzyfZNZeq
+LHEDbMo4McR/Y/da7wADBQf9GAm5486yFNc1VeMtUs7JUgJVdMdK1hxtgyMpy6i3
+xKdgReV7Nw6Vk1vKhKD53rLXfy5fk8PycSLKC63A/vhO1mHydW6pXtumILOtYdZw
+9FUNRfZIUTPyqnbPx+PZi3jmkK63qIfu8DFzfjxV9RxjhmRVgrzuBvEKqo5dAHM0
+9JOMwumE8nmYM0jrUt40IAozkLorWxnZZVZx1zsZGsLj4+0V7IurWMEYmWnmd/iF
+nDZi6CggW9om4NJJ72rNAYiEgZjLL9xBBjYplhqMQBHR+pZ8Jl56i78ZA8DfPejx
+LM/E931dZyTMAakFsTnFmRf4+DN+PKF4zd3lQuFhxk17QYhJBBgRAgAJBQJFW6Vi
+AhsMAAoJEMGEfSvM1vgBuWgAnjqmxSJjNF84pGejBbEAgPHYOlWyAJ4vpBTlolF0
+1tcyAF4QTEDQbKvJwg==
+=ssQm
+-----END PGP PUBLIC KEY BLOCK-----
+pub 1024D/5E4119DD 2007-04-06
+uid Timothy Bish <tabish121@gmail.com>
+sig 3 5E4119DD 2007-04-06 Timothy Bish <tabish121@gmail.com>
+sub 2048g/5D0D0993 2007-04-06
+sig 5E4119DD 2007-04-06 Timothy Bish <tabish121@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+
+mQGiBEYWrAMRBADIah561RTKg4Fcp9DRzLLz2lPZekB1QefjaJMpuA5hrs5otN+I
+N3DOa4eM1q2Tq4GDoo14qMWv1Xxrp3MQskYIXzFwiju6JUQ92I76BG0qutr4eJPv
+ySIIOUElo96Y+7ye9iWRmBKDjM3mFNpCZsJ+eXJyuYeJ3bPDGR3EE+jkUwCgwjCC
+IUTdsAv2osu0ddJdTgTeicMEAJphtRFabJy5+5B/idMCWQW4RldF4Dus7N+wnWR3
+zkAw77DxQfno4Y29HKFo6omvMM5rM35ZXX58oGwYAhkTUUp47zglmKBCvptKDxOK
+zr+F1lDpulEfP/bOtXE4SkPCVI+FBBSrRPEBOq9JSgZnaJcL9RRVZtIn/hFDHm/h
+DXsKA/9sRQWz6UBfKncju7co+TIqE0hf3SSfCfkFqzhZSmJl/oLR4rbC5xuSppXx
+tQP6YEZahU+6iHbbJeIIkthIO6zqXeK0QThmc6EV5cuhA2PMHUuF/w4XikA38ZSA
+jP5EBLLSTGxQHPfhdUBnV4t8yvooFR1cDjPA5a2dlnw1sX04MrQiVGltb3RoeSBC
+aXNoIDx0YWJpc2gxMjFAZ21haWwuY29tPohgBBMRAgAgBQJGFqwDAhsDBgsJCAcD
+AgQVAggDBBYCAwECHgECF4AACgkQ2iSmy15BGd09RwCffbz/I4fIKFEvnzNV1eXc
+iWIVcAEAn32HrMifDJn1ZC1msgf6gw8gCMwbuQINBEYWrAMQCADwuFOY2t5pClQm
+dNBYG8YsvaRb80FUsNmGxx32EnPv0DljWSzpLtt+JdV0Nm2RVEDXkrqV1fzVMK0v
+Ei2KR0gOwus7E/AmFFG27legqSnlMjqtB+IQyx1VUxtfQIhAR6GZt3chTtgtjSPJ
+uCksKllz9fljIc3nqem4EP63m/w6LkAWuku9zEbBmBeeT9Ac06lxCXBXNlraciRD
+MUpbCraB6zmns2C1/DaiYbK5CHhHYwzHt+M3MZOf7olRBNdl/2I6NCJY0sZwUTrp
+QqYtCSZMOC6pSrsYq0KR5Y+yUTa/VpN3DV8wzTpJbvaBuSc4zz8pQtcS6WoJlrOJ
+Jvx89WCzAAMFCAC/SkYlTw+NVqbhisi8GNqT+Jq9y2q81jpQWVBz/ELaM5mzkBlr
+tVBLLJuB5dazlGMZV5JQ5/COHQ1Z3iw5KIqnRZAnxhn8D0xDsOaT3b2voCWyM9Dp
+BqY1WPvWsTD8oFJPm9y8Wvv8iACzTUIVysG7xCig73a5KbOuNF8cYmYrHqpb6H6U
+oAUFbm0ybwagAIw6eiQuxUPWhlKpx22Le4hS9jmlDO3CQXQCqkqpEIiIsrMeiS4L
+EkaTgGy8AvkLcbzmTF5mbB3nKfiHInTY1rVXhdGM8LLnfKJazhH6AbQwrptJCsnf
+gYpsSlm9oNW4fAvB852SN+zJrly0Jl/+tsdciEkEGBECAAkFAkYWrAMCGwwACgkQ
+2iSmy15BGd0F6QCeLKexEs2tW7uJK5FkSD4c+JGzhdEAoIUj6K6rjNNbbd4gq4L7
+dnc+3S9/
+=ASER
+-----END PGP PUBLIC KEY BLOCK-----
+pub 1024D/70AE7D08 2007-04-04
+uid Nathan Mittler <nathan.mittler@gmail.com>
+sig 3 70AE7D08 2007-04-04 Nathan Mittler <nathan.mittler@gmail.com>
+sub 1024g/A1255264 2007-04-04
+sig 70AE7D08 2007-04-04 Nathan Mittler <nathan.mittler@gmail.com>
+
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.7 (Darwin)
+
+mQGiBEYTksURBADfn9FYnPKtlRhC0o6ScnPJLePomEpd22F2b8uuC+q+0A6YwvLz
+aDz9k0pEnvFFHdWjTZPUzDXEb4CjRjnoGz5hnZUNG8bJxgkwKt1nUawjYnOgy17b
+ekYmhLtyS2T6jtHx2qIHw/B9Xu0TfHZTBht1H8kFPliteJf46PTxXX3k6wCg9Dls
+YoKoV4cPodpJUiN8AmaKdh8EAKqfQEn4mkwUkBw4Th4KxIl3/YfnNeH4kL1ejp/m
+Pwdf3u7EhEcyCc2i9iNDgvjaUO0SZVD0cJShWq3Us8PT6vAB+WYvk4LWywc6tSTe
+G80Ma0KWX6CXuvFKjlS0K17PqS2G4kb8kUjgSJto/NqC6TBY7/R+X1rrXcx6NtWA
+a/cNBADAGSMJTJGUpPFXBrcncBAlfBLtXVfGGknplyjlfewi7FXopy3K3+otYune
+VHk6V/A/xULLRuGgx+GwytJRTGcNc84tuIDm2iiI4JT4E+a6Ghi5A+xucUpLLi2f
+6OMYDz2QH6IAbLXjSLUcSwW/YNg+1wFotQCKkQR5dmZgghM2PLQpTmF0aGFuIE1p
+dHRsZXIgPG5hdGhhbi5taXR0bGVyQGdtYWlsLmNvbT6IYAQTEQIAIAUCRhOSxQIb
+IwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEII00zVwrn0IlEgAoN+ULhiUYtPx
+MhMGj+i9NOtJqOKoAKDmic8ZTi3HDUpyEsOvV/FeUaBrIbkBDQRGE5LFEAQAt2cH
+aKxpQyewpsCupoC24FIdtPOxtK0fr1pM4n7zyCcjiEFVM5RzylyZg00IRcDxHE6N
+E6n6ydshZ3oM+UabvgltLpeEdJI02p0YccE7FA6iQ80ChMm4bjLUwsBW1Lw2zKza
+oDk0A8PNlmgjwHJi9yrw2nje8QH+aTvvtMj+WucAAwcD/05X6+YplQb4NPjUP7uG
+LzXuGOOS7msDBtqi3zOMzFbfY7H7OtF/SZmDzWDsZiQwq/nlTfernHCKe+/kUHTt
+9pJ7+5cGKFy5chgzVmCbYW6s8+IiaZVFLc5iWASqGhd/a9tEItughEK3pOt3kjud
+o0WcDTFOe9+YGbFAZg8kuMsbiEkEGBECAAkFAkYTksUCGwwACgkQgjTTNXCufQjL
+qQCeKZi8Gs8h9qS511FdlWnV0J6C2U4An0p+wQBKYckIUy5Fif3uWaHsSpa1
+=uYcU
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..675e7de
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,33 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+# Since we don't strictly follow the GNU standard of having 'NEWS README AUTHORS ChangeLog' files
+AUTOMAKE_OPTIONS = foreign
+
+SUBDIRS = src/main
+
+#Distribute these directories:
+DIST_SUBDIRS = src/main
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = cms.pc
+
+ACLOCAL_AMFLAGS = -I m4
+
+include doxygen-include.am
+
+EXTRA_DIST=autogen.sh $(DX_CONFIG) doc/html
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..5690868
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,67 @@
+--------------------------------------------------------------------------
+C++ Messaging Service (CMS) API
+--------------------------------------------------------------------------
+
+CMS is a JMS-like messaging API for C++ applications. This API is
+vendor-independent to encourage the adoption of a standard API
+for messaging in C++ applications.
+
+
+1 Dependencies
+--------------------------------------------------------------------------
+
+
+1.1 GNU Build System (for building on Unix/Linux/OS X/Cygwin)
+--------------------------------------------------------------------------
+
+To Generate the ./configure script use to create the Makefiles, you need
+the following software installed:
+
+Tool Recommended Version
+-------------------------------
+autoconf >= 2.59
+automake >= 1.9.6
+libtool >= 1.5.22
+
+On Debian/Ubuntu, multiple versions of autoconf and automake are available
+in separate packages. If you have multiple versions of autoconf or automake
+installed on your system, you may have to configure the versions to use
+using /usr/sbin/update-alternatives.
+
+2 Building on Unix/Linux/OS X/Cygwin
+--------------------------------------------------------------------------
+
+This assumes you have all of the project dependencies installed. We're
+now ready to create the configure script. To do this, run:
+
+ ./autogen.sh
+
+This should be run the first time and anytime you change configure.ac or
+any of the Makefile.am files.
+
+The configure script will customize the way the software is built and
+installed into your system along with detecting the available libraries
+that have been installed. To use the default configuration just run:
+
+ ./configure
+
+For more help on how to customize the build configuration, run:
+
+ ./configure --help
+
+Once the configure script has run successfully, you can build and
+install the code into the system directories with the command:
+
+ make install
+
+You will have to become the superuser in order to be able to install the
+files.
+
+3 Doxygen
+--------------------------------------------------------------------------
+
+To generate the doxygen documentation for the project, just run:
+
+ make doxygen-run
+
+
diff --git a/RELEASE_NOTES.txt b/RELEASE_NOTES.txt
new file mode 100644
index 0000000..0f56917
--- /dev/null
+++ b/RELEASE_NOTES.txt
@@ -0,0 +1,13 @@
+=========================================================================
+== Release Notes for CMS 1.0 ==
+=========================================================================
+
+== Overview ==
+
+This is the first official release of the C++ Messaging Service (CMS)
+API. It is designed to closely mirror the JMS API. CMS has evolved
+under the activemq-cpp project and is now being extracted as it's own
+tag and source bundle so that it may be used independently of
+activemq-cpp. The hope is that this will encourage more C++
+implementations and eventually the adoption of a standard API for
+messaging from C++ applications.
\ No newline at end of file
diff --git a/autogen.sh b/autogen.sh
new file mode 100644
index 0000000..57ea46d
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,19 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+#!/bin/sh
+autoreconf --force --install -I config -I m4
diff --git a/cms.pc.in b/cms.pc.in
new file mode 100644
index 0000000..3ba2aed
--- /dev/null
+++ b/cms.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: CMS API
+Description: Messaging API for C++.
+Version: @VERSION@
+Libs: -L${libdir} -l@CMS_LIBRARY_NAME@-@CMS_API_VERSION@ -ldl
+Cflags: -I${includedir}/@CMS_LIBRARY_NAME@-@CMSAPI_VERSION@ -I${libdir}/@CMS_LIBRARY_NAME@-@CMS_API_VERSION@/include
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..943dd68
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,96 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+## --------------------------------
+## Initialization macros.
+## --------------------------------
+AC_INIT(cms, 1, dev@activemq.apache.org)
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_SRCDIR(src/main/cms/BytesMessage.h)
+
+## -----------------------------------------------
+## Define the Version variables
+## -----------------------------------------------
+CMS_LIBRARY_NAME=cms
+CMS_VERSION=1.0
+CMS_LIBRARY_VERSION=0:0:0
+CMS_RELEASE=0.0
+CMS_API_VERSION=${CMS_VERSION}
+
+AC_SUBST(CMS_LIBRARY_NAME)
+AC_SUBST(CMS_VERSION)
+AC_SUBST(CMS_LIBRARY_VERSION)
+AC_SUBST(CMS_RELEASE)
+AC_SUBST(CMS_API_VERSION)
+
+PACKAGE=$CMS_LIBRARY_NAME
+VERSION=$CMS_VERSION
+
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
+AM_CONFIG_HEADER(config.h)
+
+# Gives us access to the host_os environment variable
+AC_CANONICAL_HOST
+
+## -----------------------------------------------
+## Checks for programs.
+## -----------------------------------------------
+
+AC_PROG_CC
+AC_PROG_CXX
+## Uncomment to use libtool for shared libs
+## AM_PROG_LIBTOOL
+AC_PROG_RANLIB
+AM_SANITY_CHECK
+AC_LANG_CPLUSPLUS
+
+AC_C_BIGENDIAN
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+AC_CHECK_SIZEOF(char, 1)
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long long, 8)
+AC_CHECK_SIZEOF(float, 4)
+AC_CHECK_SIZEOF(double, 8)
+
+CXXFLAGS="$CXXFLAGS -ansi -pedantic -W -Wall"
+LIBS="$LIBS"
+
+DX_HTML_FEATURE(ON)
+DX_CHM_FEATURE(OFF)
+DX_CHI_FEATURE(OFF)
+DX_MAN_FEATURE(OFF)
+DX_RTF_FEATURE(OFF)
+DX_XML_FEATURE(OFF)
+DX_PDF_FEATURE(OFF)
+DX_PS_FEATURE(OFF)
+DX_INIT_DOXYGEN(cms, doxygen.cfg, doc)
+
+
+## -----------------------------------------------------
+## configuration
+## Generates Makefile's, configuration files and scripts
+## -----------------------------------------------------
+
+AC_CONFIG_FILES(Makefile)
+AC_CONFIG_FILES(cms.pc)
+AC_CONFIG_FILES(src/main/Makefile)
+
+AC_OUTPUT
diff --git a/doxygen-include.am b/doxygen-include.am
new file mode 100644
index 0000000..ab87a45
--- /dev/null
+++ b/doxygen-include.am
@@ -0,0 +1,203 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+# Copyright (C) 2004 Oren Ben-Kiki
+# This file is distributed under the same terms as the Automake macro files.
+
+# Generate automatic documentation using Doxygen. Goals and variables values
+# are controlled by the various DX_COND_??? conditionals set by autoconf.
+#
+# The provided goals are:
+# doxygen-doc: Generate all doxygen documentation.
+# doxygen-run: Run doxygen, which will generate some of the documentation
+# (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post
+# processing required for the rest of it (PS, PDF, and some MAN).
+# doxygen-man: Rename some doxygen generated man pages.
+# doxygen-ps: Generate doxygen PostScript documentation.
+# doxygen-pdf: Generate doxygen PDF documentation.
+#
+# Note that by default these are not integrated into the automake goals. If
+# doxygen is used to generate man pages, you can achieve this integration by
+# setting man3_MANS to the list of man pages generated and then adding the
+# dependency:
+#
+# $(man3_MANS): doxygen-doc
+#
+# This will cause make to run doxygen and generate all the documentation.
+#
+# The following variable is intended for use in Makefile.am:
+#
+# DX_CLEANFILES = everything to clean.
+#
+# This is usually added to MOSTLYCLEANFILES.
+
+## --------------------------------- ##
+## Format-independent Doxygen rules. ##
+## --------------------------------- ##
+
+if DX_COND_doc
+
+## ------------------------------- ##
+## Rules specific for HTML output. ##
+## ------------------------------- ##
+
+if DX_COND_html
+
+DX_CLEAN_HTML = @DX_DOCDIR@/html
+
+endif DX_COND_html
+
+## ------------------------------ ##
+## Rules specific for CHM output. ##
+## ------------------------------ ##
+
+if DX_COND_chm
+
+DX_CLEAN_CHM = @DX_DOCDIR@/chm
+
+if DX_COND_chi
+
+DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi
+
+endif DX_COND_chi
+
+endif DX_COND_chm
+
+## ------------------------------ ##
+## Rules specific for MAN output. ##
+## ------------------------------ ##
+
+if DX_COND_man
+
+DX_CLEAN_MAN = @DX_DOCDIR@/man
+
+endif DX_COND_man
+
+## ------------------------------ ##
+## Rules specific for RTF output. ##
+## ------------------------------ ##
+
+if DX_COND_rtf
+
+DX_CLEAN_RTF = @DX_DOCDIR@/rtf
+
+endif DX_COND_rtf
+
+## ------------------------------ ##
+## Rules specific for XML output. ##
+## ------------------------------ ##
+
+if DX_COND_xml
+
+DX_CLEAN_XML = @DX_DOCDIR@/xml
+
+endif DX_COND_xml
+
+## ----------------------------- ##
+## Rules specific for PS output. ##
+## ----------------------------- ##
+
+if DX_COND_ps
+
+DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps
+
+DX_PS_GOAL = doxygen-ps
+
+doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
+
+@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag
+ cd @DX_DOCDIR@/latex; \
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
+ $(DX_LATEX) refman.tex; \
+ $(MAKEINDEX_PATH) refman.idx; \
+ $(DX_LATEX) refman.tex; \
+ countdown=5; \
+ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
+ refman.log > /dev/null 2>&1 \
+ && test $$countdown -gt 0; do \
+ $(DX_LATEX) refman.tex; \
+ countdown=`expr $$countdown - 1`; \
+ done; \
+ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi
+
+endif DX_COND_ps
+
+## ------------------------------ ##
+## Rules specific for PDF output. ##
+## ------------------------------ ##
+
+if DX_COND_pdf
+
+DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf
+
+DX_PDF_GOAL = doxygen-pdf
+
+doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf
+
+@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag
+ cd @DX_DOCDIR@/latex; \
+ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \
+ $(DX_PDFLATEX) refman.tex; \
+ $(DX_MAKEINDEX) refman.idx; \
+ $(DX_PDFLATEX) refman.tex; \
+ countdown=5; \
+ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \
+ refman.log > /dev/null 2>&1 \
+ && test $$countdown -gt 0; do \
+ $(DX_PDFLATEX) refman.tex; \
+ countdown=`expr $$countdown - 1`; \
+ done; \
+ mv refman.pdf ../@PACKAGE@.pdf
+
+endif DX_COND_pdf
+
+## ------------------------------------------------- ##
+## Rules specific for LaTeX (shared for PS and PDF). ##
+## ------------------------------------------------- ##
+
+if DX_COND_latex
+
+DX_CLEAN_LATEX = @DX_DOCDIR@/latex
+
+endif DX_COND_latex
+
+.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
+.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
+doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag
+
+doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL)
+
+@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS)
+ rm -rf @DX_DOCDIR@
+ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG)
+
+DX_CLEANFILES = \
+ @DX_DOCDIR@/@PACKAGE@.tag \
+ -r \
+ $(DX_CLEAN_HTML) \
+ $(DX_CLEAN_CHM) \
+ $(DX_CLEAN_CHI) \
+ $(DX_CLEAN_MAN) \
+ $(DX_CLEAN_RTF) \
+ $(DX_CLEAN_XML) \
+ $(DX_CLEAN_PS) \
+ $(DX_CLEAN_PDF) \
+ $(DX_CLEAN_LATEX)
+
+endif DX_COND_doc
diff --git a/doxygen.cfg b/doxygen.cfg
new file mode 100644
index 0000000..eba1104
--- /dev/null
+++ b/doxygen.cfg
@@ -0,0 +1,212 @@
+# Doxyfile 1.3.7
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME = $(PROJECT)-$(VERSION)
+PROJECT_NUMBER =
+OUTPUT_DIRECTORY = $(DOCDIR)
+CREATE_SUBDIRS = NO
+OUTPUT_LANGUAGE = English
+USE_WINDOWS_ENCODING = NO
+BRIEF_MEMBER_DESC = YES
+REPEAT_BRIEF = YES
+ABBREVIATE_BRIEF =
+ALWAYS_DETAILED_SEC = NO
+INLINE_INHERITED_MEMB = NO
+STRIP_FROM_INC_PATH = $(SRCDIR)
+FULL_PATH_NAMES = YES
+STRIP_FROM_PATH = $(SRCDIR)
+SHORT_NAMES = NO
+JAVADOC_AUTOBRIEF = YES
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP = YES
+INHERIT_DOCS = YES
+DISTRIBUTE_GROUP_DOC = NO
+TAB_SIZE = 8
+ALIASES =
+OPTIMIZE_OUTPUT_FOR_C = YES
+OPTIMIZE_OUTPUT_JAVA = NO
+SUBGROUPING = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL = YES
+EXTRACT_PRIVATE = NO
+EXTRACT_STATIC = NO
+EXTRACT_LOCAL_CLASSES = YES
+EXTRACT_LOCAL_METHODS = NO
+HIDE_UNDOC_MEMBERS = NO
+HIDE_UNDOC_CLASSES = NO
+HIDE_FRIEND_COMPOUNDS = NO
+HIDE_IN_BODY_DOCS = NO
+INTERNAL_DOCS = NO
+CASE_SENSE_NAMES = NO
+HIDE_SCOPE_NAMES = NO
+SHOW_INCLUDE_FILES = YES
+INLINE_INFO = YES
+SORT_MEMBER_DOCS = YES
+SORT_BRIEF_DOCS = NO
+SORT_BY_SCOPE_NAME = NO
+GENERATE_TODOLIST = YES
+GENERATE_TESTLIST = YES
+GENERATE_BUGLIST = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS =
+MAX_INITIALIZER_LINES = 30
+SHOW_USED_FILES = YES
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET = YES
+WARNINGS = YES
+WARN_IF_UNDOCUMENTED = YES
+WARN_IF_DOC_ERROR = YES
+WARN_FORMAT = "$file:$line: $text"
+WARN_LOGFILE =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT = $(SRCDIR)
+FILE_PATTERNS = *.c *.h
+RECURSIVE = YES
+EXCLUDE =
+EXCLUDE_SYMLINKS = NO
+EXCLUDE_PATTERNS =
+EXAMPLE_PATH = $(SRCDIR)
+EXAMPLE_PATTERNS =
+EXAMPLE_RECURSIVE = NO
+IMAGE_PATH =
+INPUT_FILTER =
+FILTER_SOURCE_FILES = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER = NO
+INLINE_SOURCES = NO
+STRIP_CODE_COMMENTS = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION = YES
+VERBATIM_HEADERS = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX = NO
+COLS_IN_ALPHA_INDEX = 5
+IGNORE_PREFIX =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML = $(GENERATE_HTML)
+HTML_OUTPUT = html
+HTML_FILE_EXTENSION = .html
+HTML_HEADER =
+HTML_FOOTER =
+HTML_STYLESHEET =
+HTML_ALIGN_MEMBERS = YES
+GENERATE_HTMLHELP = $(GENERATE_CHM)
+CHM_FILE = ../$(PROJECT).chm
+HHC_LOCATION = $(HHC_PATH)
+GENERATE_CHI = $(GENERATE_CHI)
+BINARY_TOC = NO
+TOC_EXPAND = NO
+DISABLE_INDEX = NO
+ENUM_VALUES_PER_LINE = 4
+GENERATE_TREEVIEW = YES
+TREEVIEW_WIDTH = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX = $(GENERATE_LATEX)
+LATEX_OUTPUT = latex
+LATEX_CMD_NAME = latex
+MAKEINDEX_CMD_NAME = makeindex
+COMPACT_LATEX = NO
+PAPER_TYPE = $(PAPER_SIZE)
+EXTRA_PACKAGES =
+LATEX_HEADER =
+PDF_HYPERLINKS = NO
+USE_PDFLATEX = NO
+LATEX_BATCHMODE = YES
+LATEX_HIDE_INDICES = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF = $(GENERATE_RTF)
+RTF_OUTPUT = rtf
+COMPACT_RTF = NO
+RTF_HYPERLINKS = NO
+RTF_STYLESHEET_FILE =
+RTF_EXTENSIONS_FILE =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN = $(GENERATE_MAN)
+MAN_OUTPUT = man
+MAN_EXTENSION = .1
+MAN_LINKS = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML = $(GENERATE_XML)
+XML_OUTPUT = xml
+XML_SCHEMA =
+XML_DTD =
+XML_PROGRAMLISTING = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD = NO
+PERLMOD_LATEX = NO
+PERLMOD_PRETTY = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING = YES
+MACRO_EXPANSION = NO
+EXPAND_ONLY_PREDEF = NO
+SEARCH_INCLUDES = YES
+INCLUDE_PATH =
+INCLUDE_FILE_PATTERNS =
+PREDEFINED =
+EXPAND_AS_DEFINED =
+SKIP_FUNCTION_MACROS = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES =
+GENERATE_TAGFILE = $(DOCDIR)/$(PROJECT).tag
+ALLEXTERNALS = NO
+EXTERNAL_GROUPS = YES
+PERL_PATH = $(PERL_PATH)
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS = YES
+HIDE_UNDOC_RELATIONS = YES
+HAVE_DOT = $(HAVE_DOT)
+CLASS_GRAPH = YES
+COLLABORATION_GRAPH = YES
+UML_LOOK = NO
+TEMPLATE_RELATIONS = NO
+INCLUDE_GRAPH = YES
+INCLUDED_BY_GRAPH = YES
+CALL_GRAPH = NO
+GRAPHICAL_HIERARCHY = YES
+DOT_IMAGE_FORMAT = png
+DOT_PATH = $(DOT_PATH)
+DOTFILE_DIRS =
+MAX_DOT_GRAPH_WIDTH = 1024
+MAX_DOT_GRAPH_HEIGHT = 1024
+MAX_DOT_GRAPH_DEPTH = 0
+GENERATE_LEGEND = YES
+DOT_CLEANUP = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE = NO
diff --git a/m4/ac_doxygen.m4 b/m4/ac_doxygen.m4
new file mode 100644
index 0000000..5248d71
--- /dev/null
+++ b/m4/ac_doxygen.m4
@@ -0,0 +1,324 @@
+#
+# Copyright 2007 Oren Ben-Kiki
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+
+
+# Generate automatic documentation using Doxygen. Works in concert with the
+# aminclude.m4 file and a compatible doxygen configuration file. Defines the
+# following public macros:
+#
+# DX_???_FEATURE(ON|OFF) - control the default setting fo a Doxygen feature.
+# Supported features are 'DOXYGEN' itself, 'DOT' for generating graphics,
+# 'HTML' for plain HTML, 'CHM' for compressed HTML help (for MS users), 'CHI'
+# for generating a seperate .chi file by the .chm file, and 'MAN', 'RTF',
+# 'XML', 'PDF' and 'PS' for the appropriate output formats. The environment
+# variable DOXYGEN_PAPER_SIZE may be specified to override the default 'a4wide'
+# paper size.
+#
+# By default, HTML, PDF and PS documentation is generated as this seems to be
+# the most popular and portable combination. MAN pages created by Doxygen are
+# usually problematic, though by picking an appropriate subset and doing some
+# massaging they might be better than nothing. CHM and RTF are specific for MS
+# (note that you can't generate both HTML and CHM at the same time). The XML is
+# rather useless unless you apply specialized post-processing to it.
+#
+# The macro mainly controls the default state of the feature. The use can
+# override the default by specifying --enable or --disable. The macros ensure
+# that contradictory flags are not given (e.g., --enable-doxygen-html and
+# --enable-doxygen-chm, --enable-doxygen-anything with --disable-doxygen, etc.)
+# Finally, each feature will be automatically disabled (with a warning) if the
+# required programs are missing.
+#
+# Once all the feature defaults have been specified, call DX_INIT_DOXYGEN with
+# the following parameters: a one-word name for the project for use as a
+# filename base etc., an optional configuration file name (the default is
+# 'Doxyfile', the same as Doxygen's default), and an optional output directory
+# name (the default is 'doxygen-doc').
+
+## ----------##
+## Defaults. ##
+## ----------##
+
+DX_ENV=""
+AC_DEFUN([DX_FEATURE_doc], ON)
+AC_DEFUN([DX_FEATURE_dot], ON)
+AC_DEFUN([DX_FEATURE_man], OFF)
+AC_DEFUN([DX_FEATURE_html], ON)
+AC_DEFUN([DX_FEATURE_chm], OFF)
+AC_DEFUN([DX_FEATURE_chi], OFF)
+AC_DEFUN([DX_FEATURE_rtf], OFF)
+AC_DEFUN([DX_FEATURE_xml], OFF)
+AC_DEFUN([DX_FEATURE_pdf], ON)
+AC_DEFUN([DX_FEATURE_ps], ON)
+
+## --------------- ##
+## Private macros. ##
+## --------------- ##
+
+# DX_ENV_APPEND(VARIABLE, VALUE)
+# ------------------------------
+# Append VARIABLE="VALUE" to DX_ENV for invoking doxygen.
+AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])])
+
+# DX_DIRNAME_EXPR
+# ---------------
+# Expand into a shell expression prints the directory part of a path.
+AC_DEFUN([DX_DIRNAME_EXPR],
+ [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']])
+
+# DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF)
+# -------------------------------------
+# Expands according to the M4 (static) status of the feature.
+AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])])
+
+# DX_REQUIRE_PROG(VARIABLE, PROGRAM)
+# ----------------------------------
+# Require the specified program to be found for the DX_CURRENT_FEATURE to work.
+AC_DEFUN([DX_REQUIRE_PROG], [
+AC_PATH_TOOL([$1], [$2])
+if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then
+ AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION])
+ AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0)
+fi
+])
+
+# DX_TEST_FEATURE(FEATURE)
+# ------------------------
+# Expand to a shell expression testing whether the feature is active.
+AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1])
+
+# DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE)
+# -------------------------------------------------
+# Verify that a required features has the right state before trying to turn on
+# the DX_CURRENT_FEATURE.
+AC_DEFUN([DX_CHECK_DEPEND], [
+test "$DX_FLAG_$1" = "$2" \
+|| AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1,
+ requires, contradicts) doxygen-DX_CURRENT_FEATURE])
+])
+
+# DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE)
+# ----------------------------------------------------------
+# Turn off the DX_CURRENT_FEATURE if the required feature is off.
+AC_DEFUN([DX_CLEAR_DEPEND], [
+test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0)
+])
+
+# DX_FEATURE_ARG(FEATURE, DESCRIPTION,
+# CHECK_DEPEND, CLEAR_DEPEND,
+# REQUIRE, DO-IF-ON, DO-IF-OFF)
+# --------------------------------------------
+# Parse the command-line option controlling a feature. CHECK_DEPEND is called
+# if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND),
+# otherwise CLEAR_DEPEND is called to turn off the default state if a required
+# feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional
+# requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and
+# DO-IF-ON or DO-IF-OFF are called according to the final state of the feature.
+AC_DEFUN([DX_ARG_ABLE], [
+ AC_DEFUN([DX_CURRENT_FEATURE], [$1])
+ AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2])
+ AC_ARG_ENABLE(doxygen-$1,
+ [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1],
+ [--enable-doxygen-$1]),
+ DX_IF_FEATURE([$1], [don't $2], [$2]))],
+ [
+case "$enableval" in
+#(
+y|Y|yes|Yes|YES)
+ AC_SUBST([DX_FLAG_$1], 1)
+ $3
+;; #(
+n|N|no|No|NO)
+ AC_SUBST([DX_FLAG_$1], 0)
+;; #(
+*)
+ AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1])
+;;
+esac
+], [
+AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)])
+$4
+])
+if DX_TEST_FEATURE([$1]); then
+ $5
+ :
+fi
+if DX_TEST_FEATURE([$1]); then
+ AM_CONDITIONAL(DX_COND_$1, :)
+ $6
+ :
+else
+ AM_CONDITIONAL(DX_COND_$1, false)
+ $7
+ :
+fi
+])
+
+## -------------- ##
+## Public macros. ##
+## -------------- ##
+
+# DX_XXX_FEATURE(DEFAULT_STATE)
+# -----------------------------
+AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])])
+AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])])
+AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])])
+AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])])
+AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])])
+AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])])
+AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
+AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])])
+AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])])
+AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])])
+
+# DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR])
+# ---------------------------------------------------------
+# PROJECT also serves as the base name for the documentation files.
+# The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc".
+AC_DEFUN([DX_INIT_DOXYGEN], [
+
+# Files:
+AC_SUBST([DX_PROJECT], [$1])
+AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])])
+AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])])
+
+# Environment variables used inside doxygen.cfg:
+DX_ENV_APPEND(SRCDIR, $srcdir)
+DX_ENV_APPEND(PROJECT, $DX_PROJECT)
+DX_ENV_APPEND(DOCDIR, $DX_DOCDIR)
+DX_ENV_APPEND(VERSION, $PACKAGE_VERSION)
+
+# Doxygen itself:
+DX_ARG_ABLE(doc, [generate any doxygen documentation],
+ [],
+ [],
+ [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen)
+ DX_REQUIRE_PROG([DX_PERL], perl)],
+ [DX_ENV_APPEND(PERL_PATH, $DX_PERL)])
+
+# Dot for graphics:
+DX_ARG_ABLE(dot, [generate graphics for doxygen documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_DOT], dot)],
+ [DX_ENV_APPEND(HAVE_DOT, YES)
+ DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])],
+ [DX_ENV_APPEND(HAVE_DOT, NO)])
+
+# Man pages generation:
+DX_ARG_ABLE(man, [generate doxygen manual pages],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_MAN, YES)],
+ [DX_ENV_APPEND(GENERATE_MAN, NO)])
+
+# RTF file generation:
+DX_ARG_ABLE(rtf, [generate doxygen RTF documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_RTF, YES)],
+ [DX_ENV_APPEND(GENERATE_RTF, NO)])
+
+# XML file generation:
+DX_ARG_ABLE(xml, [generate doxygen XML documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_XML, YES)],
+ [DX_ENV_APPEND(GENERATE_XML, NO)])
+
+# (Compressed) HTML help generation:
+DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_HHC], hhc)],
+ [DX_ENV_APPEND(HHC_PATH, $DX_HHC)
+ DX_ENV_APPEND(GENERATE_HTML, YES)
+ DX_ENV_APPEND(GENERATE_HTMLHELP, YES)],
+ [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)])
+
+# Seperate CHI file generation.
+DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file],
+ [DX_CHECK_DEPEND(chm, 1)],
+ [DX_CLEAR_DEPEND(chm, 1)],
+ [],
+ [DX_ENV_APPEND(GENERATE_CHI, YES)],
+ [DX_ENV_APPEND(GENERATE_CHI, NO)])
+
+# Plain HTML pages generation:
+DX_ARG_ABLE(html, [generate doxygen plain HTML documentation],
+ [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)],
+ [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)],
+ [],
+ [DX_ENV_APPEND(GENERATE_HTML, YES)],
+ [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)])
+
+# PostScript file generation:
+DX_ARG_ABLE(ps, [generate doxygen PostScript documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_LATEX], latex)
+ DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
+ DX_REQUIRE_PROG([DX_DVIPS], dvips)
+ DX_REQUIRE_PROG([DX_EGREP], egrep)])
+
+# PDF file generation:
+DX_ARG_ABLE(pdf, [generate doxygen PDF documentation],
+ [DX_CHECK_DEPEND(doc, 1)],
+ [DX_CLEAR_DEPEND(doc, 1)],
+ [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex)
+ DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex)
+ DX_REQUIRE_PROG([DX_EGREP], egrep)])
+
+# LaTeX generation for PS and/or PDF:
+if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then
+ AM_CONDITIONAL(DX_COND_latex, :)
+ DX_ENV_APPEND(GENERATE_LATEX, YES)
+else
+ AM_CONDITIONAL(DX_COND_latex, false)
+ DX_ENV_APPEND(GENERATE_LATEX, NO)
+fi
+
+# Paper size for PS and/or PDF:
+AC_ARG_VAR(DOXYGEN_PAPER_SIZE,
+ [a4wide (default), a4, letter, legal or executive])
+case "$DOXYGEN_PAPER_SIZE" in
+#(
+"")
+ AC_SUBST(DOXYGEN_PAPER_SIZE, "")
+;; #(
+a4wide|a4|letter|legal|executive)
+ DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE)
+;; #(
+*)
+ AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'])
+;;
+esac
+
+#For debugging:
+#echo DX_FLAG_doc=$DX_FLAG_doc
+#echo DX_FLAG_dot=$DX_FLAG_dot
+#echo DX_FLAG_man=$DX_FLAG_man
+#echo DX_FLAG_html=$DX_FLAG_html
+#echo DX_FLAG_chm=$DX_FLAG_chm
+#echo DX_FLAG_chi=$DX_FLAG_chi
+#echo DX_FLAG_rtf=$DX_FLAG_rtf
+#echo DX_FLAG_xml=$DX_FLAG_xml
+#echo DX_FLAG_pdf=$DX_FLAG_pdf
+#echo DX_FLAG_ps=$DX_FLAG_ps
+#echo DX_ENV=$DX_ENV
+])
diff --git a/src/main/Makefile.am b/src/main/Makefile.am
new file mode 100644
index 0000000..608f300
--- /dev/null
+++ b/src/main/Makefile.am
@@ -0,0 +1,63 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+cc_sources =
+
+h_sources = cms/DeliveryMode.h \
+ cms/TemporaryQueue.h \
+ cms/MapMessage.h \
+ cms/Destination.h \
+ cms/Connection.h \
+ cms/TemporaryTopic.h \
+ cms/Stoppable.h \
+ cms/Topic.h \
+ cms/BytesMessage.h \
+ cms/CMSException.h \
+ cms/Session.h \
+ cms/Startable.h \
+ cms/Closeable.h \
+ cms/MessageListener.h \
+ cms/ObjectMessage.h \
+ cms/TextMessage.h \
+ cms/ExceptionListener.h \
+ cms/Queue.h \
+ cms/ConnectionFactory.h \
+ cms/MessageProducer.h \
+ cms/Message.h \
+ cms/MessageConsumer.h
+
+##
+## Compiler / Linker Info
+##
+
+lib_LIBRARIES=libcms.a
+libcms_a_SOURCES= $(h_sources) $(cc_sources)
+
+##
+## Uncomment to build a shared lib
+##
+##lib_LTLIBRARIES= libactivemq-cpp.la
+##libcms_la_SOURCES= $(h_sources) $(cc_sources)
+##libcms_la_LDFLAGS= -version-info $(CMS_LIBRARY_VERSION) -release $(CMS_VERSION)
+##libcms_la_LIBADD=-ldl
+
+
+##
+## Packaging Info
+##
+library_includedir=$(includedir)/$(CMS_LIBRARY_NAME)-$(CMS_VERSION)
+nobase_library_include_HEADERS = $(h_sources)
diff --git a/src/main/cms/BytesMessage.h b/src/main/cms/BytesMessage.h
new file mode 100644
index 0000000..2da93a3
--- /dev/null
+++ b/src/main/cms/BytesMessage.h
@@ -0,0 +1,294 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_BYTESMESSAGE_H_
+#define _CMS_BYTESMESSAGE_H_
+
+#include <cms/Message.h>
+
+namespace cms{
+
+ class BytesMessage : public Message{
+
+ public:
+
+ virtual ~BytesMessage(){}
+
+ /**
+ * sets the bytes given to the message body.
+ * @param Byte Buffer to copy
+ * @param Number of bytes in Buffer to copy
+ * @throws CMSException
+ */
+ virtual void setBodyBytes(
+ const unsigned char* buffer, std::size_t numBytes )
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets the bytes that are contained in this message, user should
+ * copy this data into a user allocated buffer. Call
+ * <code>getBodyLength</code> to determine the number of bytes
+ * to expect.
+ * @return const pointer to a byte buffer
+ */
+ virtual const unsigned char* getBodyBytes() const = 0;
+
+ /**
+ * Returns the number of bytes contained in the body of this message.
+ * @return number of bytes.
+ */
+ virtual std::size_t getBodyLength() const = 0;
+
+ /**
+ * Puts the message body in read-only mode and repositions the stream
+ * of bytes to the beginning.
+ * @throws CMSException
+ */
+ virtual void reset() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a Boolean from the Bytes message stream
+ * @returns boolean value from stream
+ * @throws CMSException
+ */
+ virtual bool readBoolean() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a boolean to the bytes message stream as a 1-byte value.
+ * The value true is written as the value (byte)1; the value false
+ * is written as the value (byte)0.
+ * @param value - boolean to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeBoolean( bool value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a Byte from the Bytes message stream
+ * @returns unsigned char value from stream
+ * @throws CMSException
+ */
+ virtual unsigned char readByte() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a byte to the bytes message stream as a 1-byte value
+ * @param value - byte to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeByte( unsigned char value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a byte array from the bytes message stream.
+ *
+ * If the length of vector value is less than the number of bytes
+ * remaining to be read from the stream, the vector should be filled. A
+ * subsequent call reads the next increment, and so on.
+ *
+ * If the number of bytes remaining in the stream is less than the
+ * length of vector value, the bytes should be read into the vector. The
+ * return value of the total number of bytes read will be less than the
+ * length of the vector, indicating that there are no more bytes left to
+ * be read from the stream. The next read of the stream returns -1.
+ *
+ * @param value - buffer to place data in
+ * @returns the total number of bytes read into the buffer, or -1 if
+ * there is no more data because the end of the stream has
+ * been reached
+ * @throws CMSException if an error occurs.
+ */
+ virtual std::size_t readBytes( std::vector<unsigned char>& value )
+ throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a byte array to the bytes message stream using the vector
+ * size as the number of bytes to write.
+ * @param value - bytes to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeBytes( const std::vector<unsigned char>& value )
+ throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a portion of the bytes message stream.
+ *
+ * If the length of array value is less than the number of bytes
+ * remaining to be read from the stream, the array should be filled. A
+ * subsequent call reads the next increment, and so on.
+ *
+ * If the number of bytes remaining in the stream is less than the
+ * length of array value, the bytes should be read into the array. The
+ * return value of the total number of bytes read will be less than the
+ * length of the array, indicating that there are no more bytes left to
+ * be read from the stream. The next read of the stream returns -1.
+ *
+ * If length is negative, or length is greater than the length of the
+ * array value, then an IndexOutOfBoundsException is thrown. No bytes
+ * will be read from the stream for this exception case.
+ *
+ * @param value - the buffer into which the data is read
+ * @param length - the number of bytes to read; must be less than or
+ * equal to value.length
+ * @returns the total number of bytes read into the buffer, or -1 if
+ * there is no more data because the end of the stream has
+ * been reached
+ * @throws CMSException
+ */
+ virtual std::size_t readBytes( unsigned char*& buffer, std::size_t length )
+ throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a portion of a byte array to the bytes message stream.
+ * size as the number of bytes to write.
+ * @param value - bytes to write to the stream
+ * @param offset - the initial offset within the byte array
+ * @param length - the number of bytes to use
+ * @throws CMSException
+ */
+ virtual void writeBytes( const unsigned char* value,
+ std::size_t offset,
+ std::size_t length ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a Char from the Bytes message stream
+ * @returns char value from stream
+ * @throws CMSException
+ */
+ virtual char readChar() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a char to the bytes message stream as a 1-byte value
+ * @param value - char to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeChar( char value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a 32 bit float from the Bytes message stream
+ * @returns double value from stream
+ * @throws CMSException
+ */
+ virtual float readFloat() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a float to the bytes message stream as a 4 byte value
+ * @param value - float to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeFloat( float value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a 64 bit double from the Bytes message stream
+ * @returns double value from stream
+ * @throws CMSException
+ */
+ virtual double readDouble() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a double to the bytes message stream as a 8 byte value
+ * @param value - double to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeDouble( double value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a 16 bit signed short from the Bytes message stream
+ * @returns short value from stream
+ * @throws CMSException
+ */
+ virtual short readShort() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a signed short to the bytes message stream as a 2 byte value
+ * @param value - signed short to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeShort( short value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a 16 bit unsigned short from the Bytes message stream
+ * @returns unsigned short value from stream
+ * @throws CMSException
+ */
+ virtual unsigned short readUnsignedShort() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a unsigned short to the bytes message stream as a 2 byte value
+ * @param value - unsigned short to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeUnsignedShort( unsigned short value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a 32 bit signed intger from the Bytes message stream
+ * @returns int value from stream
+ * @throws CMSException
+ */
+ virtual int readInt() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a signed int to the bytes message stream as a 4 byte value
+ * @param value - signed int to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeInt( int value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads a 64 bit long from the Bytes message stream
+ * @returns long long value from stream
+ * @throws CMSException
+ */
+ virtual long long readLong() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes a long long to the bytes message stream as a 8 byte value
+ * @param value - signed long long to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeLong( long long value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads an ASCII String from the Bytes message stream
+ * @returns String from stream
+ * @throws CMSException
+ */
+ virtual std::string readString() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes an ASCII String to the Bytes message stream
+ * @param value - String to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeString( const std::string& value ) throw ( cms::CMSException ) = 0;
+
+ /**
+ * Reads an UTF String from the BytesMessage stream
+ * @returns String from stream
+ * @throws CMSException
+ */
+ virtual std::string readUTF() throw ( cms::CMSException ) = 0;
+
+ /**
+ * Writes an UTF String to the BytesMessage stream
+ * @param value - String to write to the stream
+ * @throws CMSException
+ */
+ virtual void writeUTF( const std::string& value ) throw ( cms::CMSException ) = 0;
+
+ virtual BytesMessage* clone() const = 0;
+ };
+}
+
+#endif /*_CMS_BYTESMESSAGE_H_*/
diff --git a/src/main/cms/CMSException.h b/src/main/cms/CMSException.h
new file mode 100644
index 0000000..7b8067b
--- /dev/null
+++ b/src/main/cms/CMSException.h
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef CMS_CMSEXCEPTION_H
+#define CMS_CMSEXCEPTION_H
+
+// Includes
+#include <string>
+#include <vector>
+#include <iostream>
+#include <exception>
+
+namespace cms{
+
+ /**
+ * This class represents an error that has occurred in
+ * cms.
+ */
+ class CMSException : public std::exception {
+
+ public:
+
+ CMSException() throw() {}
+
+ virtual ~CMSException() throw() {}
+
+ /**
+ * Gets the cause of the error.
+ * @return string errors message
+ */
+ virtual std::string getMessage() const = 0;
+
+ /**
+ * Adds a file/line number to the stack trace.
+ * @param file The name of the file calling this method (use __FILE__).
+ * @param lineNumber The line number in the calling file (use __LINE__).
+ */
+ virtual void setMark( const char* file, const int lineNumber ) = 0;
+
+ /**
+ * Clones this exception. This is useful for cases where you need
+ * to preserve the type of the original exception as well as the message.
+ * All subclasses should override.
+ * @return Copy of this Exception object
+ */
+ virtual CMSException* clone() const = 0;
+
+ /**
+ * Provides the stack trace for every point where
+ * this exception was caught, marked, and rethrown.
+ * @return vector containing stack trace strings
+ */
+ virtual std::vector< std::pair< std::string, int> > getStackTrace() const = 0;
+
+ /**
+ * Prints the stack trace to std::err
+ */
+ virtual void printStackTrace() const = 0;
+
+ /**
+ * Prints the stack trace to the given output stream.
+ * @param stream the target output stream.
+ */
+ virtual void printStackTrace( std::ostream& stream ) const = 0;
+
+ /**
+ * Gets the stack trace as one contiguous string.
+ * @return string with formatted stack trace data
+ */
+ virtual std::string getStackTraceString() const = 0;
+
+ };
+
+}
+
+#endif /*CMS_CMSEXCEPTION_H*/
diff --git a/src/main/cms/Closeable.h b/src/main/cms/Closeable.h
new file mode 100644
index 0000000..eb60b07
--- /dev/null
+++ b/src/main/cms/Closeable.h
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef CMS_CLOSEABLE_H
+#define CMS_CLOSEABLE_H
+
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * Interface for a class that implements the close method.
+ */
+ class Closeable{
+
+ public:
+
+ virtual ~Closeable(){}
+
+ /**
+ * Closes this object and deallocates the appropriate resources.
+ * The object is generally no longer usable after calling close.
+ * @throws CMSException
+ */
+ virtual void close() throw( CMSException ) = 0;
+
+ };
+}
+
+#endif /*CMS_CLOSEABLE_H*/
diff --git a/src/main/cms/Connection.h b/src/main/cms/Connection.h
new file mode 100644
index 0000000..21d48ff
--- /dev/null
+++ b/src/main/cms/Connection.h
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_CONNECTION_H_
+#define _CMS_CONNECTION_H_
+
+#include <cms/Startable.h>
+#include <cms/Stoppable.h>
+#include <cms/Closeable.h>
+#include <cms/Session.h>
+
+namespace cms
+{
+ class ExceptionListener;
+
+ class Connection :
+ public Startable,
+ public Stoppable,
+ public Closeable
+ {
+ public:
+
+ virtual ~Connection() {}
+
+ /**
+ * Closes this connection as well as any Sessions
+ * created from it (and those Sessions' consumers and
+ * producers).
+ * @throws CMSException
+ */
+ virtual void close() throw( CMSException ) = 0;
+
+ /**
+ * Creates an AUTO_ACKNOWLEDGE Session.
+ * @throws CMSException
+ */
+ virtual Session* createSession() throw ( CMSException ) = 0;
+
+ /**
+ * Creates a new Session to work for this Connection using the
+ * specified acknowledgment mode
+ * @param the Acknowledgement Mode to use.
+ * @throws CMSException
+ */
+ virtual Session* createSession( Session::AcknowledgeMode ackMode )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Get the Client Id for this session
+ * @return Client Id String
+ */
+ virtual std::string getClientID() const = 0;
+
+ /**
+ * Gets the registered Exception Listener for this connection
+ * @return pointer to an exception listnener or NULL
+ */
+ virtual ExceptionListener* getExceptionListener() const = 0;
+
+ /**
+ * Sets the registed Exception Listener for this connection
+ * @param pointer to and <code>ExceptionListener</code>
+ */
+ virtual void setExceptionListener( ExceptionListener* listener ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_CONNECTION_H_*/
diff --git a/src/main/cms/ConnectionFactory.h b/src/main/cms/ConnectionFactory.h
new file mode 100644
index 0000000..f68c0a0
--- /dev/null
+++ b/src/main/cms/ConnectionFactory.h
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _CMS_CONNECTIONFACTORY_H_
+#define _CMS_CONNECTIONFACTORY_H_
+
+#include <cms/Connection.h>
+#include <cms/CMSException.h>
+
+#include <string>
+
+namespace cms
+{
+
+ /**
+ * Defines the interface for a factory that creates connection objects
+ */
+ class ConnectionFactory
+ {
+ public:
+
+ virtual ~ConnectionFactory() {}
+
+ /**
+ * Creates a connection with the default user identity. The
+ * connection is created in stopped mode. No messages will be
+ * delivered until the Connection.start method is explicitly
+ * called.
+ * @return Pointer to a connection object, caller owns the pointer
+ * @throws CMSException
+ */
+ virtual Connection* createConnection() throw ( CMSException ) = 0;
+
+ /**
+ * Creates a connection with the default specified identity. The
+ * connection is created in stopped mode. No messages will be
+ * delivered until the Connection.start method is explicitly
+ * called. The username and password values passed here do not
+ * change the defaults, subsequent calls to the parameterless
+ * createConnection will continue to use the default values that
+ * were set in the Constructor.
+ * @param username to authenticate with
+ * @param password to authenticate with
+ * @returns a Connection Pointer
+ * @throws CMSException
+ */
+ virtual cms::Connection* createConnection( const std::string& username,
+ const std::string& password )
+ throw ( cms::CMSException ) = 0;
+
+ /**
+ * Creates a connection with the specified user identity. The
+ * connection is created in stopped mode. No messages will be
+ * delivered until the Connection.start method is explicitly
+ * called. The username and password values passed here do not
+ * change the defaults, subsequent calls to the parameterless
+ * createConnection will continue to use the default values that
+ * were set in the Constructor.
+ * @param username to authenticate with
+ * @param password to authenticate with
+ * @param clientId to assign to connection if "" then a random cleint
+ * Id is created for this connection.
+ * @returns a Connection Pointer
+ * @throws CMSException
+ */
+ virtual cms::Connection* createConnection( const std::string& username,
+ const std::string& password,
+ const std::string& clientId )
+ throw ( cms::CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_CONNECTIONFACTORY_H_*/
diff --git a/src/main/cms/DeliveryMode.h b/src/main/cms/DeliveryMode.h
new file mode 100644
index 0000000..01286a6
--- /dev/null
+++ b/src/main/cms/DeliveryMode.h
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_DELIVERYMODE_H_
+#define _CMS_DELIVERYMODE_H_
+
+namespace cms
+{
+
+ /**
+ * This is an Abstract class whose purpose is to provide a container
+ * for the delivery mode enumeration for CMS messages.
+ */
+ class DeliveryMode
+ {
+ public:
+
+ virtual ~DeliveryMode() {}
+
+ /**
+ * Enumeration values for Message Delivery Mode
+ */
+ static const int PERSISTENT = 0;
+ static const int NON_PERSISTENT = 1;
+
+ };
+
+}
+
+#endif /*DELIVERYMODE_H_*/
diff --git a/src/main/cms/Destination.h b/src/main/cms/Destination.h
new file mode 100644
index 0000000..e8036e4
--- /dev/null
+++ b/src/main/cms/Destination.h
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_DESTINATION_H_
+#define _CMS_DESTINATION_H_
+
+#include <activemq/util/Properties.h>
+
+#include <string>
+
+namespace cms{
+
+ /**
+ * A Destination object encapsulates a provider-specific address.
+ */
+ class Destination{
+ public:
+
+ enum DestinationType
+ {
+ TOPIC,
+ QUEUE,
+ TEMPORARY_TOPIC,
+ TEMPORARY_QUEUE
+ };
+
+ public:
+
+ /**
+ * Destructor
+ */
+ virtual ~Destination(){}
+
+ /**
+ * Retrieve the Destination Type for this Destination
+ * @return The Destination Type
+ */
+ virtual DestinationType getDestinationType() const = 0;
+
+ /**
+ * Converts the Destination to a String value representing the
+ * Provider specific name for this destination. This name must
+ * uniquely identify a particular destination. For example, a topic
+ * and a queue both named "FOO" must not have equivalent provider
+ * strings.
+ * @return Provider specific Name
+ */
+ virtual std::string toProviderString() const = 0;
+
+ /**
+ * Creates a new instance of this destination type that is a
+ * copy of this one, and returns it.
+ * @returns cloned copy of this object
+ */
+ virtual cms::Destination* clone() const = 0;
+
+ /**
+ * Copies the contents of the given Destinastion object to this one.
+ * @param source The source Destination object.
+ */
+ virtual void copy( const cms::Destination& source ) = 0;
+
+ /**
+ * Retrieve any properties that might be part of the destination
+ * that was specified. This is a deviation from the JMS spec
+ * but necessary due to C++ restrictions.
+ * @return const reference to a properties object.
+ */
+ virtual const activemq::util::Properties& getProperties() const = 0;
+
+ };
+}
+
+#endif /*_CMS_DESTINATION_H_*/
diff --git a/src/main/cms/ExceptionListener.h b/src/main/cms/ExceptionListener.h
new file mode 100644
index 0000000..613ffe3
--- /dev/null
+++ b/src/main/cms/ExceptionListener.h
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_EXCEPTIONLISTENER_H_
+#define _CMS_EXCEPTIONLISTENER_H_
+
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ class ExceptionListener
+ {
+ public:
+
+ virtual ~ExceptionListener() {}
+
+ /**
+ * Called when an exception occurs. Once notified of an exception
+ * the caller should no longer use the resource that generated the
+ * exception.
+ * @param Exception Object that occurred.
+ */
+ virtual void onException( const cms::CMSException& ex ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_EXCEPTIONLISTENER_H_*/
diff --git a/src/main/cms/MapMessage.h b/src/main/cms/MapMessage.h
new file mode 100644
index 0000000..e926b89
--- /dev/null
+++ b/src/main/cms/MapMessage.h
@@ -0,0 +1,237 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_MAPMESSAGE_H_
+#define _CMS_MAPMESSAGE_H_
+
+#include <cms/Message.h>
+
+namespace cms
+{
+
+ /**
+ * A MapMessage object is used to send a set of name-value pairs. The
+ * names are String objects, and the values are primitive data types in
+ * the Java programming language. The names must have a value that is
+ * not null, and not an empty string. The entries can be accessed
+ * sequentially or randomly by name. The order of the entries is
+ * undefined. MapMessage inherits from the Message interface and adds
+ * a message body that contains a Map.
+ *
+ * When a client receives a MapMessage, it is in read-only mode. If a
+ * client attempts to write to the message at this point, a
+ * CMSException is thrown.
+ */
+ class MapMessage : public Message
+ {
+ public:
+
+ virtual ~MapMessage() {}
+
+ /**
+ * Returns an Enumeration of all the names in the MapMessage
+ * object.
+ * @return STL Vector of String values, each of which is the
+ * name of an item in the MapMessage
+ * @throws CMSException
+ */
+ virtual std::vector< std::string > getMapNames() const = 0;
+
+ /**
+ * Indicates whether an item exists in this MapMessage object.
+ * @param name - String name of the Object in question
+ * @return boolean value indicating if the name is in the map
+ */
+ virtual bool itemExists( const std::string& name ) const = 0;
+
+ /**
+ * Returns the Boolean value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual bool getBoolean( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a boolean value with the specified name into the Map.
+ * @param name - the name of the boolean
+ * @param value - the boolean value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setBoolean( const std::string& name,
+ bool value ) throw( CMSException ) = 0;
+
+ /**
+ * Returns the Byte value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual unsigned char getByte( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Byte value with the specified name into the Map.
+ * @param name - the name of the Byte
+ * @param value - the Byte value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setByte( const std::string& name,
+ unsigned char value ) throw( CMSException ) = 0;
+
+ /**
+ * Returns the Bytes value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual std::vector<unsigned char> getBytes( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Bytes value with the specified name into the Map.
+ * @param name - the name of the Bytes
+ * @param value - the Bytes value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setBytes( const std::string& name,
+ const std::vector<unsigned char>& value )
+ throw( CMSException ) = 0;
+
+ /**
+ * Returns the Char value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual char getChar( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Char value with the specified name into the Map.
+ * @param name - the name of the Char
+ * @param value - the Char value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setChar( const std::string& name, char value )
+ throw( CMSException ) = 0;
+
+ /**
+ * Returns the Double value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual double getDouble( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Double value with the specified name into the Map.
+ * @param name - the name of the Double
+ * @param value - the Double value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setDouble( const std::string& name,
+ double value ) throw( CMSException ) = 0;
+
+ /**
+ * Returns the Float value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual float getFloat( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Float value with the specified name into the Map.
+ * @param name - the name of the Float
+ * @param value - the Float value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setFloat( const std::string& name, float value )
+ throw( CMSException ) = 0;
+
+ /**
+ * Returns the Int value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual int getInt( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Int value with the specified name into the Map.
+ * @param name - the name of the Int
+ * @param value - the Int value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setInt( const std::string& name, int value )
+ throw( CMSException ) = 0;
+
+ /**
+ * Returns the Long value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual long long getLong( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Long value with the specified name into the Map.
+ * @param name - the name of the Long
+ * @param value - the Long value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setLong( const std::string& name, long long value )
+ throw( CMSException ) = 0;
+
+ /**
+ * Returns the Short value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual short getShort( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a Short value with the specified name into the Map.
+ * @param name - the name of the Short
+ * @param value - the Short value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setShort( const std::string& name, short value )
+ throw( CMSException ) = 0;
+
+ /**
+ * Returns the String value of the Specified name
+ * @param name of the value to fetch from the map
+ * @throws CMSException
+ */
+ virtual std::string getString( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a String value with the specified name into the Map.
+ * @param name - the name of the String
+ * @param value - the String value to set in the Map
+ * @throws CMSException
+ */
+ virtual void setString( const std::string& name,
+ const std::string& value )
+ throw( CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_MAPMESSAGE_H_*/
diff --git a/src/main/cms/Message.h b/src/main/cms/Message.h
new file mode 100644
index 0000000..866889c
--- /dev/null
+++ b/src/main/cms/Message.h
@@ -0,0 +1,571 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_MESSAGE_H_
+#define _CMS_MESSAGE_H_
+
+#include <activemq/util/Properties.h>
+
+#include <cms/Destination.h>
+#include <cms/CMSException.h>
+#include <cms/DeliveryMode.h>
+
+namespace cms{
+
+ /**
+ * Root of all messages. As in JMS, a message is comprised of
+ * 3 parts: CMS-specific headers, user-defined properties, and
+ * the body.
+ *
+ * @see JMS API
+ */
+ class Message
+ {
+ public:
+
+ virtual ~Message(){}
+
+ /**
+ * Clone this message exactly, returns a new instance that the
+ * caller is required to delete.
+ * @return new copy of this message
+ */
+ virtual Message* clone() const = 0;
+
+ /**
+ * Acknowledges all consumed messages of the session of this consumed
+ * message.
+ *
+ * All consumed CMS messages support the acknowledge method for use
+ * when a client has specified that its CMS session's consumed messages
+ * are to be explicitly acknowledged. By invoking acknowledge on a
+ * consumed message, a client acknowledges all messages consumed by the
+ * session that the message was delivered to.
+ *
+ * Calls to acknowledge are ignored for both transacted sessions and
+ * sessions specified to use implicit acknowledgement modes.
+ *
+ * A client may individually acknowledge each message as it is consumed,
+ * or it may choose to acknowledge messages as an application-defined
+ * group (which is done by calling acknowledge on the last received
+ * message of the group, thereby acknowledging all messages consumed by
+ * the session.)
+ *
+ * Messages that have been received but not acknowledged may be
+ * redelivered.
+ */
+ virtual void acknowledge() const throw( CMSException ) = 0;
+
+ /**
+ * Clears out the body of the message. This does not clear the
+ * headers or properties.
+ */
+ virtual void clearBody() = 0;
+
+ /**
+ * Clears out the message body. Clearing a message's body does not clear
+ * its header values or property entries.
+ *
+ * If this message body was read-only, calling this method leaves the
+ * message body in the same state as an empty body in a newly created
+ * message.
+ */
+ virtual void clearProperties() = 0;
+
+ /**
+ * Retrieves the propery names.
+ * @return The complete set of property names currently in this
+ * message.
+ */
+ virtual std::vector<std::string> getPropertyNames() const = 0;
+
+ /**
+ * Indicates whether or not a given property exists.
+ * @param name The name of the property to look up.
+ * @return True if the property exists in this message.
+ */
+ virtual bool propertyExists( const std::string& name ) const = 0;
+
+ /**
+ * Gets a boolean property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual bool getBooleanProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a byte property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual unsigned char getByteProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a double property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual double getDoubleProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a float property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual float getFloatProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a int property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual int getIntProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a long property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual long long getLongProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a short property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual short getShortProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Gets a string property.
+ * @param name The name of the property to retrieve.
+ * @return The value for the named property.
+ * @throws CMSException if the property does not exist.
+ */
+ virtual std::string getStringProperty( const std::string& name ) const
+ throw( CMSException ) = 0;
+
+ /**
+ * Sets a boolean property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setBooleanProperty( const std::string& name,
+ bool value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a byte property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setByteProperty( const std::string& name,
+ unsigned char value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a double property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setDoubleProperty( const std::string& name,
+ double value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a float property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setFloatProperty( const std::string& name,
+ float value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a int property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setIntProperty( const std::string& name,
+ int value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a long property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setLongProperty( const std::string& name,
+ long long value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a short property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setShortProperty( const std::string& name,
+ short value ) throw( CMSException ) = 0;
+
+ /**
+ * Sets a string property.
+ * @param name The name of the property to retrieve.
+ * @param value The value for the named property.
+ * @throws CMSException
+ */
+ virtual void setStringProperty( const std::string& name,
+ const std::string& value ) throw( CMSException ) = 0;
+
+ /**
+ * Gets the correlation ID for the message.
+ *
+ * This method is used to return correlation ID values that are either
+ * provider-specific message IDs or application-specific String values.
+ *
+ * @return string representation of the correlation Id
+ */
+ virtual std::string getCMSCorrelationID() const = 0;
+
+ /**
+ * Sets the correlation ID for the message.
+ *
+ * A client can use the CMSCorrelationID header field to link one
+ * message with another. A typical use is to link a response message
+ * with its request message.
+ *
+ * CMSCorrelationID can hold one of the following:
+ *
+ * - A provider-specific message ID
+ * - An application-specific String
+ * - A provider-native byte[] value
+ *
+ * Since each message sent by a CMS provider is assigned a message ID
+ * value, it is convenient to link messages via message ID. All message
+ * ID values must start with the 'ID:' prefix.
+ *
+ * In some cases, an application (made up of several clients) needs to
+ * use an application-specific value for linking messages. For instance,
+ * an application may use CMSCorrelationID to hold a value referencing
+ * some external information. Application-specified values must not
+ * start with the 'ID:' prefix; this is reserved for provider-generated
+ * message ID values.
+ *
+ * If a provider supports the native concept of correlation ID, a CMS
+ * client may need to assign specific CMSCorrelationID values to match
+ * those expected by clients that do not use the CMS API. A byte[] value
+ * is used for this purpose. CMS providers without native correlation ID
+ * values are not required to support byte[] values. The use of a byte[]
+ * value for CMSCorrelationID is non-portable.
+ *
+ * @param correlationId - the message ID of a message being referred to.
+ */
+ virtual void setCMSCorrelationID( const std::string& correlationId ) = 0;
+
+ /**
+ * Gets the DeliveryMode for this message
+ * @return DeliveryMode enumerated value.
+ */
+ virtual int getCMSDeliveryMode() const = 0;
+
+ /**
+ * Sets the DeliveryMode for this message
+ *
+ * CMS providers set this field when a message is sent. This method can
+ * be used to change the value for a message that has been received.
+ *
+ * @param mode - DeliveryMode enumerated value.
+ */
+ virtual void setCMSDeliveryMode( int mode ) = 0;
+
+ /**
+ * Gets the Destination object for this message.
+ *
+ * The CMSDestination header field contains the destination to which the
+ * message is being sent.
+ *
+ * When a message is sent, this field is ignored. After completion of
+ * the send or publish method, the field holds the destination specified
+ * by the method.
+ *
+ * When a message is received, its CMSDestination value must be
+ * equivalent to the value assigned when it was sent.
+ *
+ * @return Destination object
+ */
+ virtual const Destination* getCMSDestination() const = 0;
+
+ /**
+ * Sets the Destination object for this message.
+ *
+ * CMS providers set this field when a message is sent. This method can
+ * be used to change the value for a message that has been received.
+ *
+ * @param destination - Destination Object
+ */
+ virtual void setCMSDestination( const Destination* destination ) = 0;
+
+ /**
+ * Gets the message's expiration value.
+ *
+ * When a message is sent, the CMSExpiration header field is left
+ * unassigned. After completion of the send or publish method, it holds
+ * the expiration time of the message. This is the sum of the
+ * time-to-live value specified by the client and the GMT at the time
+ * of the send or publish.
+ *
+ * If the time-to-live is specified as zero, CMSExpiration is set to
+ * zero to indicate that the message does not expire.
+ *
+ * When a message's expiration time is reached, a provider should
+ * discard it. The CMS API does not define any form of notification of
+ * message expiration.
+ *
+ * Clients should not receive messages that have expired; however, the
+ * CMS API does not guarantee that this will not happen.
+ *
+ * @return the time the message expires, which is the sum of the
+ * time-to-live value specified by the client and the GMT at the time
+ * of the send
+ */
+ virtual long long getCMSExpiration() const = 0;
+
+ /**
+ * Sets the message's expiration value.
+ *
+ * CMS providers set this field when a message is sent. This method can
+ * be used to change the value for a message that has been received.
+ *
+ * @param expireTime the message's expiration time
+ */
+ virtual void setCMSExpiration( long long expireTime ) = 0;
+
+ /**
+ * The CMSMessageID header field contains a value that uniquely
+ * identifies each message sent by a provider.
+ *
+ * When a message is sent, CMSMessageID can be ignored. When the
+ * send or publish method returns, it contains a provider-assigned
+ * value.
+ *
+ * A CMSMessageID is a String value that should function as a unique
+ * key for identifying messages in a historical repository. The exact
+ * scope of uniqueness is provider-defined. It should at least cover
+ * all messages for a specific installation of a provider, where an
+ * installation is some connected set of message routers.
+ *
+ * All CMSMessageID values must start with the prefix 'ID:'. Uniqueness
+ * of message ID values across different providers is not required.
+ *
+ * Since message IDs take some effort to create and increase a
+ * message's size, some CMS providers may be able to optimize message
+ * overhead if they are given a hint that the message ID is not used by
+ * an application. By calling the MessageProducer.setDisableMessageID
+ * method, a CMS client enables this potential optimization for all
+ * messages sent by that message producer. If the CMS provider accepts
+ * this hint, these messages must have the message ID set to null; if
+ * the provider ignores the hint, the message ID must be set to its
+ * normal unique value.
+ *
+ * @return provider-assigned message id
+ */
+ virtual std::string getCMSMessageID() const = 0;
+
+ /**
+ * Sets the message ID.
+ *
+ * CMS providers set this field when a message is sent. This method can
+ * be used to change the vaue for a message that has been received.
+ *
+ * @param id - the ID of the message
+ */
+ virtual void setCMSMessageID( const std::string& id ) = 0;
+
+ /**
+ * Gets the message priority level.
+ *
+ * The CMS API defines ten levels of priority value, with 0 as the
+ * lowest priority and 9 as the highest. In addition, clients should
+ * consider priorities 0-4 as gradations of normal priority and
+ * priorities 5-9 as gradations of expedited priority.
+ *
+ * The CMS API does not require that a provider strictly implement
+ * priority ordering of messages; however, it should do its best to
+ * deliver expedited messages ahead of normal messages.
+ *
+ * @return priority value
+ */
+ virtual int getCMSPriority() const = 0;
+
+ /**
+ * Sets the Priority Value for this message
+ *
+ * CMS providers set this field when a message is sent. This method can
+ * be used to change the value for a message that has been received.
+ *
+ * @param priority - priority value for this message
+ */
+ virtual void setCMSPriority( int priority ) = 0;
+
+ /**
+ * Gets an indication of whether this message is being redelivered.
+ *
+ * If a client receives a message with the CMSRedelivered field set, it
+ * is likely, but not guaranteed, that this message was delivered
+ * earlier but that its receipt was not acknowledged at that time.
+ *
+ * @return true if this message is being redelivered
+ */
+ virtual bool getCMSRedelivered() const = 0;
+
+ /**
+ * Specifies whether this message is being redelivered.
+ *
+ * This field is set at the time the message is delivered. This method
+ * can be used to change the value for a message that has been received.
+ *
+ * @param redelivered - boolean redelivered value
+ */
+ virtual void setCMSRedelivered( bool redelivered ) = 0;
+
+ /**
+ * Gets the Destination object to which a reply to this message should
+ * be sent.
+ *
+ * @return Destination to which to send a response to this message
+ */
+ virtual const cms::Destination* getCMSReplyTo() const = 0;
+
+ /**
+ * Sets the Destination object to which a reply to this message should
+ * be sent.
+ *
+ * The CMSReplyTo header field contains the destination where a reply
+ * to the current message should be sent. If it is null, no reply is
+ * expected. The destination may be either a Queue object or a Topic
+ * object.
+ *
+ * Messages sent with a null CMSReplyTo value may be a notification of
+ * some event, or they may just be some data the sender thinks is of
+ * interest.
+ *
+ * Messages with a CMSReplyTo value typically expect a response. A
+ * response is optional; it is up to the client to decide. These
+ * messages are called requests. A message sent in response to a
+ * request is called a reply.
+ *
+ * In some cases a client may wish to match a request it sent earlier
+ * with a reply it has just received. The client can use the
+ * CMSCorrelationID header field for this purpose.
+ *
+ * @param destination - Destination to which to send a response to this
+ * message
+ */
+ virtual void setCMSReplyTo( const cms::Destination* destination ) = 0;
+
+ /**
+ * Gets the message timestamp.
+ *
+ * The CMSTimestamp header field contains the time a message was handed
+ * off to a provider to be sent. It is not the time the message was
+ * actually transmitted, because the actual send may occur later due to
+ * transactions or other client-side queueing of messages.
+ *
+ * When a message is sent, CMSTimestamp is ignored. When the send or
+ * publish method returns, it contains a time value somewhere in the
+ * interval between the call and the return. The value is in the format
+ * of a normal millis time value in the Java programming language.
+ *
+ * Since timestamps take some effort to create and increase a message's
+ * size, some CMS providers may be able to optimize message overhead if
+ * they are given a hint that the timestamp is not used by an
+ * application. By calling the MessageProducer.setDisableMessageTimestamp
+ * method, a CMS client enables this potential optimization for all
+ * messages sent by that message producer. If the CMS provider accepts
+ * this hint, these messages must have the timestamp set to zero; if the
+ * provider ignores the hint, the timestamp must be set to its normal
+ * value.
+ *
+ * @return the message timestamp
+ */
+ virtual long long getCMSTimestamp() const = 0;
+
+ /**
+ * Sets the message timestamp.
+ *
+ * CMS providers set this field when a message is sent. This method can
+ * be used to change the value for a message that has been received.
+ *
+ * @param timeStamp - integer time stamp value
+ */
+ virtual void setCMSTimestamp( long long timeStamp ) = 0;
+
+ /**
+ * Gets the message type identifier supplied by the client when the
+ * message was sent.
+ *
+ * @return the message type
+ * @see setCMSType
+ */
+ virtual std::string getCMSType() const = 0;
+
+ /**
+ * Sets the message type.
+ *
+ * Some CMS providers use a message repository that contains the
+ * definitions of messages sent by applications. The CMSType header
+ * field may reference a message's definition in the provider's
+ * repository.
+ *
+ * The CMS API does not define a standard message definition repository,
+ * nor does it define a naming policy for the definitions it contains.
+ *
+ * Some messaging systems require that a message type definition for
+ * each application message be created and that each message specify its
+ * type. In order to work with such CMS providers, CMS clients should
+ * assign a value to CMSType, whether the application makes use of it or
+ * not. This ensures that the field is properly set for those providers
+ * that require it.
+ *
+ * To ensure portability, CMS clients should use symbolic values for
+ * CMSType that can be configured at installation time to the values
+ * defined in the current provider's message repository. If string
+ * literals are used, they may not be valid type names for some CMS
+ * providers.
+ *
+ * @param type the message type
+ * @see getCMSType
+ */
+ virtual void setCMSType( const std::string& type ) = 0;
+
+ };
+}
+
+#endif /*_CMS_MESSAGE_H_*/
diff --git a/src/main/cms/MessageConsumer.h b/src/main/cms/MessageConsumer.h
new file mode 100644
index 0000000..a8402fd
--- /dev/null
+++ b/src/main/cms/MessageConsumer.h
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_MESSAGECONSUMER_H_
+#define _CMS_MESSAGECONSUMER_H_
+
+#include <cms/MessageListener.h>
+#include <cms/Message.h>
+#include <cms/Closeable.h>
+
+namespace cms
+{
+
+ class MessageConsumer : public Closeable
+ {
+ public:
+
+ virtual ~MessageConsumer() {}
+
+ /**
+ * Synchronously Receive a Message
+ * @return new message
+ * @throws CMSException
+ */
+ virtual Message* receive() throw ( CMSException ) = 0;
+
+ /**
+ * Synchronously Receive a Message, time out after defined interval.
+ * Returns null if nothing read.
+ * @return new message
+ * @throws CMSException
+ */
+ virtual Message* receive( int millisecs ) throw ( CMSException ) = 0;
+
+ /**
+ * Receive a Message, does not wait if there isn't a new message
+ * to read, returns NULL if nothing read.
+ * @return new message
+ * @throws CMSException
+ */
+ virtual Message* receiveNoWait() throw ( CMSException ) = 0;
+
+ /**
+ * Sets the MessageListener that this class will send notifs on
+ * @param MessageListener interface pointer
+ */
+ virtual void setMessageListener( MessageListener* listener ) = 0;
+
+ /**
+ * Gets the MessageListener that this class will send notifs on
+ * @param MessageListener interface pointer
+ */
+ virtual MessageListener* getMessageListener() const = 0;
+
+ /**
+ * Gets this message consumer's message selector expression.
+ * @return This Consumer's selector expression or "".
+ * @throws cms::CMSException
+ */
+ virtual std::string getMessageSelector() const
+ throw ( cms::CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_MESSAGECONSUMER_H_*/
diff --git a/src/main/cms/MessageListener.h b/src/main/cms/MessageListener.h
new file mode 100644
index 0000000..4f74892
--- /dev/null
+++ b/src/main/cms/MessageListener.h
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_MESSAGELISTENER_H_
+#define _CMS_MESSAGELISTENER_H_
+
+namespace cms{
+
+ class Message;
+
+ class MessageListener{
+ public:
+
+ virtual ~MessageListener(){}
+
+ /**
+ * Called asynchronously when a new message is received, the message
+ * reference can be to any othe Message types. a dynamic cast is used
+ * to find out what type of message this is. The lifetime of this
+ * object is only guaranteed to be for life of the onMessage function
+ * after this returns the message may no longer exists. User should
+ * copy the data or clone the message if they wish to keep something
+ * around about this message.
+ *
+ * It is considered a programming error for this method to throw an
+ * exception.
+ *
+ * @param Message object const pointer recipient does not own.
+ */
+ virtual void onMessage( const Message* message ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_MESSAGELISTENER_H_*/
diff --git a/src/main/cms/MessageProducer.h b/src/main/cms/MessageProducer.h
new file mode 100644
index 0000000..ebaaad8
--- /dev/null
+++ b/src/main/cms/MessageProducer.h
@@ -0,0 +1,154 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_MESSAGEPRODUCER_H_
+#define _CMS_MESSAGEPRODUCER_H_
+
+#include <cms/Message.h>
+#include <cms/Destination.h>
+#include <cms/Closeable.h>
+#include <cms/CMSException.h>
+#include <cms/DeliveryMode.h>
+
+namespace cms
+{
+ /**
+ * defines the <code>MessageProducer</code> interface that is used
+ * by all MessageProducer derivations. This class defines the JMS
+ * spec'd interface for a MessageProducer.
+ */
+ class MessageProducer : public Closeable
+ {
+ public:
+
+ virtual ~MessageProducer() {}
+
+ /**
+ * Sends the message to the default producer destination, but does
+ * not take ownership of the message, caller must still destroy it.
+ * Uses default values for deliveryMode, priority, and time to live.
+ * @param message - a Message Object Pointer
+ * @throws CMSException
+ */
+ virtual void send( Message* message ) throw ( CMSException ) = 0;
+
+ /**
+ * Sends the message to the default producer destination, but does
+ * not take ownership of the message, caller must still destroy it.
+ * @param message - a Message Object Pointer
+ * @param deliverMode The delivery mode to be used.
+ * @param priority The priority for this message.
+ * @param timeToLive The time to live value for this message in
+ * milliseconds.
+ * @throws CMSException
+ */
+ virtual void send( Message* message, int deliveryMode, int priority,
+ long long timeToLive) throw ( CMSException ) = 0;
+
+ /**
+ * Sends the message to the designated destination, but does
+ * not take ownership of the message, caller must still destroy it.
+ * Uses default values for deliveryMode, priority, and time to live.
+ * @param destination - a Message Object Pointer
+ * @param message - the message to send to the destination
+ * @throws CMSException
+ */
+ virtual void send( const Destination* destination,
+ Message* message ) throw ( CMSException ) = 0;
+
+ /**
+ * Sends the message to the designated destination, but does
+ * not take ownership of the message, caller must still destroy it.
+ * @param destination - a Message Object Pointer
+ * @param message - a Message Object Pointer
+ * @param deliverMode The delivery mode to be used.
+ * @param priority The priority for this message.
+ * @param timeToLive The time to live value for this message in
+ * milliseconds.
+ * @throws CMSException
+ */
+ virtual void send( const Destination* destination,
+ Message* message, int deliveryMode, int priority,
+ long long timeToLive) throw ( CMSException ) = 0;
+
+ /**
+ * Sets the delivery mode for this Producer
+ * @param mode - The DeliveryMode
+ */
+ virtual void setDeliveryMode( int mode ) = 0;
+
+ /**
+ * Gets the delivery mode for this Producer
+ * @return The DeliveryMode
+ */
+ virtual int getDeliveryMode() const = 0;
+
+ /**
+ * Sets if Message Ids are disbled for this Producer
+ * @param value - boolean indicating enable / disable (true / false)
+ */
+ virtual void setDisableMessageID( bool value ) = 0;
+
+ /**
+ * Gets if Message Ids are disbled for this Producer
+ * @return boolean indicating enable / disable (true / false)
+ */
+ virtual bool getDisableMessageID() const = 0;
+
+ /**
+ * Sets if Message Time Stamps are disbled for this Producer
+ * @param value - boolean indicating enable / disable (true / false)
+ */
+ virtual void setDisableMessageTimeStamp( bool value ) = 0;
+
+ /**
+ * Gets if Message Time Stamps are disbled for this Producer
+ * @return boolean indicating enable / disable (true / false)
+ */
+ virtual bool getDisableMessageTimeStamp() const = 0;
+
+ /**
+ * Sets the Priority that this Producers sends messages at
+ * @param priority - int value for Priority level
+ */
+ virtual void setPriority( int priority ) = 0;
+
+ /**
+ * Gets the Priority level that this producer sends messages at
+ * @return int based priority level
+ */
+ virtual int getPriority() const = 0;
+
+ /**
+ * Sets the Time to Live that this Producers sends messages with. This
+ * value will be used if the time to live is not specified via the
+ * send method.
+ * @param time - default time to live value in milliseconds
+ */
+ virtual void setTimeToLive( long long time ) = 0;
+
+ /**
+ * Gets the Time to Live that this producer sends messages with
+ * @return Time to live value in milliseconds
+ */
+ virtual long long getTimeToLive() const = 0;
+
+ };
+
+}
+
+#endif /*_CMS_MESSAGEPRODUCER_H_*/
diff --git a/src/main/cms/ObjectMessage.h b/src/main/cms/ObjectMessage.h
new file mode 100644
index 0000000..7451114
--- /dev/null
+++ b/src/main/cms/ObjectMessage.h
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_OBJECTMESSAGE_H_
+#define _CMS_OBJECTMESSAGE_H_
+
+#include <cms/Message.h>
+
+namespace cms{
+
+ class ObjectMessage : Message
+ {
+ public:
+
+ virtual ~ObjectMessage() {}
+
+ };
+
+}
+
+#endif /*_CMS_OBJECTMESSAGE_H_*/
diff --git a/src/main/cms/Queue.h b/src/main/cms/Queue.h
new file mode 100644
index 0000000..d2960c7
--- /dev/null
+++ b/src/main/cms/Queue.h
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_QUEUE_H_
+#define _CMS_QUEUE_H_
+
+#include <cms/Destination.h>
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * An interface encapsulating a provider-specific queue name.
+ */
+ class Queue : public Destination{
+
+ public:
+
+ virtual ~Queue(){}
+
+ /**
+ * Gets the name of this queue.
+ * @return The queue name.
+ */
+ virtual std::string getQueueName() const
+ throw( CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_QUEUE_H_*/
diff --git a/src/main/cms/Session.h b/src/main/cms/Session.h
new file mode 100644
index 0000000..d92b660
--- /dev/null
+++ b/src/main/cms/Session.h
@@ -0,0 +1,282 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+#ifndef _CMS_SESSION_H_
+#define _CMS_SESSION_H_
+
+#include <cms/Closeable.h>
+#include <cms/Message.h>
+#include <cms/TextMessage.h>
+#include <cms/BytesMessage.h>
+#include <cms/MapMessage.h>
+#include <cms/MessageProducer.h>
+#include <cms/MessageConsumer.h>
+#include <cms/Topic.h>
+#include <cms/Queue.h>
+#include <cms/TemporaryTopic.h>
+#include <cms/TemporaryQueue.h>
+#include <cms/CMSException.h>
+
+namespace cms
+{
+
+ class Session : public Closeable
+ {
+ public:
+
+ enum AcknowledgeMode
+ {
+ /**
+ * With this acknowledgment mode, the session automatically
+ * acknowledges a client's receipt of a message either when
+ * the session has successfully returned from a call to receive
+ * or when the message listener the session has called to
+ * process the message successfully returns.
+ */
+ AUTO_ACKNOWLEDGE,
+
+ /**
+ * With this acknowledgment mode, the session automatically
+ * acknowledges a client's receipt of a message either when
+ * the session has successfully returned from a call to receive
+ * or when the message listener the session has called to
+ * process the message successfully returns. Acknowlegements
+ * may be delayed in this mode to increase performance at
+ * the cost of the message being redelivered this client fails.
+ */
+ DUPS_OK_ACKNOWLEDGE,
+
+ /**
+ * With this acknowledgment mode, the client acknowledges a
+ * consumed message by calling the message's acknowledge method.
+ */
+ CLIENT_ACKNOWLEDGE,
+
+ /**
+ * Messages will be consumed when the transaction commits.
+ */
+ SESSION_TRANSACTED
+
+ };
+
+ public:
+
+ virtual ~Session() {}
+
+ /**
+ * Closes this session as well as any active child consumers or
+ * producers.
+ * @throws CMSException
+ */
+ virtual void close() throw( CMSException ) = 0;
+
+ /**
+ * Commits all messages done in this transaction and releases any
+ * locks currently held.
+ * @throws CMSException
+ */
+ virtual void commit() throw ( CMSException ) = 0;
+
+ /**
+ * Rollsback all messages done in this transaction and releases any
+ * locks currently held.
+ * @throws CMSException
+ */
+ virtual void rollback() throw ( CMSException ) = 0;
+
+ /**
+ * Creates a MessageConsumer for the specified destination.
+ * @param the Destination that this consumer receiving messages for.
+ * @return pointer to a new MessageConsumer that is owned by the
+ * caller ( caller deletes )
+ * @throws CMSException
+ */
+ virtual MessageConsumer* createConsumer(
+ const Destination* destination )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a MessageConsumer for the specified destination, using a
+ * message selector.
+ * @param the Destination that this consumer receiving messages for.
+ * @param the Message Selector to use
+ * @return pointer to a new MessageConsumer that is owned by the
+ * caller ( caller deletes )
+ * @throws CMSException
+ */
+ virtual MessageConsumer* createConsumer(
+ const Destination* destination,
+ const std::string& selector )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a MessageConsumer for the specified destination, using a
+ * message selector.
+ * @param the Destination that this consumer receiving messages for.
+ * @param the Message Selector to use
+ * @param if true, and the destination is a topic, inhibits the
+ * delivery of messages published by its own connection. The behavior
+ * for NoLocal is not specified if the destination is a queue.
+ * @return pointer to a new MessageConsumer that is owned by the
+ * caller ( caller deletes )
+ * @throws CMSException
+ */
+ virtual MessageConsumer* createConsumer(
+ const Destination* destination,
+ const std::string& selector,
+ bool noLocal )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a durable subscriber to the specified topic, using a
+ * message selector
+ * @param the topic to subscribe to
+ * @param name used to identify the subscription
+ * @param only messages matching the selector are received
+ * @return pointer to a new durable MessageConsumer that is owned by
+ * the caller ( caller deletes )
+ * @throws CMSException
+ */
+ virtual MessageConsumer* createDurableConsumer(
+ const Topic* destination,
+ const std::string& name,
+ const std::string& selector,
+ bool noLocal = false )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a MessageProducer to send messages to the specified
+ * destination.
+ * @param the Destination to publish on
+ * @return New MessageProducer that is owned by the caller.
+ * @throws CMSException
+ */
+ virtual MessageProducer* createProducer( const Destination* destination )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a queue identity given a Queue name.
+ * @param the name of the new Queue
+ * @return new Queue pointer that is owned by the caller.
+ * @throws CMSException
+ */
+ virtual Queue* createQueue( const std::string& queueName )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a topic identity given a Queue name.
+ * @param the name of the new Topic
+ * @return new Topic pointer that is owned by the caller.
+ * @throws CMSException
+ */
+ virtual Topic* createTopic( const std::string& topicName )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a TemporaryQueue object.
+ * @return new TemporaryQueue pointer that is owned by the caller.
+ * @throws CMSException
+ */
+ virtual TemporaryQueue* createTemporaryQueue()
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a TemporaryTopic object.
+ * @throws CMSException
+ */
+ virtual TemporaryTopic* createTemporaryTopic()
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a new Message
+ * @throws CMSException
+ */
+ virtual Message* createMessage()
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a BytesMessage
+ * @throws CMSException
+ */
+ virtual BytesMessage* createBytesMessage()
+ throw ( CMSException) = 0;
+
+ /**
+ * Creates a BytesMessage and sets the paylod to the passed value
+ * @param an array of bytes to set in the message
+ * @param the size of the bytes array, or number of bytes to use
+ * @throws CMSException
+ */
+ virtual BytesMessage* createBytesMessage(
+ const unsigned char* bytes,
+ std::size_t bytesSize )
+ throw ( CMSException) = 0;
+
+ /**
+ * Creates a new TextMessage
+ * @throws CMSException
+ */
+ virtual TextMessage* createTextMessage()
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a new TextMessage and set the text to the value given
+ * @param the initial text for the message
+ * @throws CMSException
+ */
+ virtual TextMessage* createTextMessage( const std::string& text )
+ throw ( CMSException ) = 0;
+
+ /**
+ * Creates a new MapMessage
+ * @throws CMSException
+ */
+ virtual MapMessage* createMapMessage()
+ throw ( CMSException ) = 0;
+
+ /**
+ * Returns the acknowledgement mode of the session.
+ * @return the Sessions Acknowledge Mode
+ */
+ virtual AcknowledgeMode getAcknowledgeMode() const = 0;
+
+ /**
+ * Gets if the Sessions is a Transacted Session
+ * @return transacted true - false.
+ */
+ virtual bool isTransacted() const = 0;
+
+ /**
+ * Unsubscribes a durable subscription that has been created by a
+ * client.
+ *
+ * This method deletes the state being maintained on behalf of the
+ * subscriber by its provider. It is erroneous for a client to delete a
+ * durable subscription while there is an active MessageConsumer or
+ * Subscriber for the subscription, or while a consumed message is
+ * part of a pending transaction or has not been acknowledged in the
+ * session.
+ * @param name the name used to identify this subscription
+ * @throws CMSException
+ */
+ virtual void unsubscribe( const std::string& name )
+ throw ( CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_SESSION_H_*/
diff --git a/src/main/cms/Startable.h b/src/main/cms/Startable.h
new file mode 100644
index 0000000..233b169
--- /dev/null
+++ b/src/main/cms/Startable.h
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef CMS_STARTABLE_H
+#define CMS_STARTABLE_H
+
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * Interface for a class that implements the start method.
+ */
+ class Startable{
+
+ public:
+
+ virtual ~Startable(){}
+
+ /**
+ * Starts the service.
+ */
+ virtual void start() throw( CMSException ) = 0;
+
+ };
+}
+
+#endif /*CMS_STARTABLE_H*/
diff --git a/src/main/cms/Stoppable.h b/src/main/cms/Stoppable.h
new file mode 100644
index 0000000..3d08e3c
--- /dev/null
+++ b/src/main/cms/Stoppable.h
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef CMS_STOPPABLE_H
+#define CMS_STOPPABLE_H
+
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * Interface for a class that implements the stop method.
+ */
+ class Stoppable{
+
+ public:
+
+ virtual ~Stoppable(){}
+
+ /**
+ * Stops this service.
+ */
+ virtual void stop() throw( CMSException ) = 0;
+
+ };
+}
+
+#endif /*CMS_STOPPABLE_H*/
diff --git a/src/main/cms/TemporaryQueue.h b/src/main/cms/TemporaryQueue.h
new file mode 100644
index 0000000..af63d94
--- /dev/null
+++ b/src/main/cms/TemporaryQueue.h
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_TEMPORARYQUEUE_H_
+#define _CMS_TEMPORARYQUEUE_H_
+
+#include <cms/Destination.h>
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * An interface encapsulating a provider-specific queue name.
+ */
+ class TemporaryQueue : public Destination
+ {
+ public:
+
+ virtual ~TemporaryQueue() {}
+
+ /**
+ * Gets the name of this queue.
+ * @return The queue name.
+ */
+ virtual std::string getQueueName() const
+ throw( CMSException ) = 0;
+
+ /**
+ * Destroy's the Temp Destination at the Broker
+ * @throws CMSException
+ */
+ virtual void destroy() throw ( CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_TEMPORARYQUEUE_H_*/
diff --git a/src/main/cms/TemporaryTopic.h b/src/main/cms/TemporaryTopic.h
new file mode 100644
index 0000000..c8d1642
--- /dev/null
+++ b/src/main/cms/TemporaryTopic.h
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_TEMPORARYTOPIC_H_
+#define _CMS_TEMPORARYTOPIC_H_
+
+#include <cms/Destination.h>
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * An interface encapsulating a provider-specific topic name.
+ */
+ class TemporaryTopic : public Destination
+ {
+ public:
+
+ virtual ~TemporaryTopic() {}
+
+ /**
+ * Gets the name of this topic.
+ * @return The topic name.
+ */
+ virtual std::string getTopicName()
+ const throw( CMSException ) = 0;
+
+ /**
+ * Destroy's the Temp Destination at the Broker
+ * @throws CMSException
+ */
+ virtual void destroy() throw ( CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_TEMPORARYTOPIC_H_*/
diff --git a/src/main/cms/TextMessage.h b/src/main/cms/TextMessage.h
new file mode 100644
index 0000000..90eb0fd
--- /dev/null
+++ b/src/main/cms/TextMessage.h
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_TEXTMESSAGE_H_
+#define _CMS_TEXTMESSAGE_H_
+
+#include <cms/Message.h>
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * Interface for a text message.
+ */
+ class TextMessage : public Message{
+
+ public:
+
+ virtual ~TextMessage(){}
+
+ /**
+ * Gets the message character buffer.
+ * @return The message character buffer.
+ */
+ virtual std::string getText() const throw( CMSException ) = 0;
+
+ /**
+ * Sets the message contents, does not take ownership of the passed
+ * char*, but copies it instead.
+ * @param msg The message buffer.
+ */
+ virtual void setText( const char* msg ) throw( CMSException ) = 0;
+
+ /**
+ * Sets the message contents
+ * @param msg The message buffer.
+ */
+ virtual void setText( const std::string& msg ) throw( CMSException ) = 0;
+
+ };
+}
+
+#endif /*_CMS_TEXTMESSAGE_H_*/
diff --git a/src/main/cms/Topic.h b/src/main/cms/Topic.h
new file mode 100644
index 0000000..8a8ee30
--- /dev/null
+++ b/src/main/cms/Topic.h
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _CMS_TOPIC_
+#define _CMS_TOPIC_
+
+#include <cms/Destination.h>
+#include <cms/CMSException.h>
+
+namespace cms{
+
+ /**
+ * An interface encapsulating a provider-specific topic name.
+ */
+ class Topic : public Destination{
+
+ public:
+
+ virtual ~Topic() {}
+
+ /**
+ * Gets the name of this topic.
+ * @return The topic name.
+ */
+ virtual std::string getTopicName()
+ const throw( CMSException ) = 0;
+
+ };
+
+}
+
+#endif /*_CMS_TOPIC_*/