activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r531533 [2/2] - in /activemq/activemq-cpp/tags/cms-1.0: ./ m4/ src/ src/main/ src/main/cms/
Date Mon, 23 Apr 2007 16:51:40 GMT
Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/DeliveryMode.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/DeliveryMode.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/DeliveryMode.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/DeliveryMode.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/DeliveryMode.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Destination.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Destination.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Destination.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Destination.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Destination.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ExceptionListener.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ExceptionListener.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ExceptionListener.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ExceptionListener.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ExceptionListener.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MapMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MapMessage.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MapMessage.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MapMessage.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MapMessage.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Message.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Message.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Message.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Message.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Message.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageConsumer.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageConsumer.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageConsumer.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageConsumer.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageListener.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageListener.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageListener.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageListener.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageListener.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageProducer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageProducer.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageProducer.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageProducer.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/MessageProducer.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ObjectMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ObjectMessage.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ObjectMessage.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ObjectMessage.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/ObjectMessage.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Queue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Queue.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Queue.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Queue.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Queue.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Session.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Session.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Session.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Session.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Session.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Startable.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Startable.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Startable.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Startable.h Mon Apr 23 09:51:38 2007
@@ -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*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Startable.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Stoppable.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Stoppable.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Stoppable.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Stoppable.h Mon Apr 23 09:51:38 2007
@@ -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*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Stoppable.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryQueue.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryQueue.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryQueue.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryQueue.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryTopic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryTopic.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryTopic.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryTopic.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TemporaryTopic.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TextMessage.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TextMessage.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TextMessage.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TextMessage.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/TextMessage.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Topic.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Topic.h?view=auto&rev=531533
==============================================================================
--- activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Topic.h (added)
+++ activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Topic.h Mon Apr 23 09:51:38 2007
@@ -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_*/

Propchange: activemq/activemq-cpp/tags/cms-1.0/src/main/cms/Topic.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message