activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r505724 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector: openwire/ stomp/
Date Sat, 10 Feb 2007 17:06:12 GMT
Author: tabish
Date: Sat Feb 10 09:06:11 2007
New Revision: 505724

URL: http://svn.apache.org/viewvc?view=rev&rev=505724
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30

Added:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h?view=auto&rev=505724
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConsumerInfo.h
Sat Feb 10 09:06:11 2007
@@ -0,0 +1,123 @@
+/*
+ * 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 _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRECONSUMERINFO_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRECONSUMERINFO_H_
+
+#include <activemq/connector/ConsumerInfo.h>
+#include <cms/Destination.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+
+    class OpenWireConsumerInfo : public ConsumerInfo {
+
+    private:
+
+        // Message Selector for this Consumer
+        std::string selector;
+
+        // Consumer Id
+        unsigned int consumerId;
+
+        // Destination
+        cms::Destination* destination;
+
+        // Session Info - We do not own this
+        const SessionInfo* session;
+
+    public:
+
+        OpenWireConsumerInfo() {
+            selector = "";
+            consumerId = 0;
+            destination = NULL;
+            session = NULL;
+        }
+
+        virtual ~OpenWireConsumerInfo() {}
+
+        /**
+         * Gets this message consumer's message selector expression.
+         * @return This Consumer's selector expression or "".
+         */
+        virtual const std::string& getMessageSelector(void) const {
+            return selector;
+        }
+
+        /**
+         * Sets this message consumer's message selector expression.
+         * @param selector This Consumer's selector expression or "".
+         */
+        virtual void setMessageSelector( const std::string& selector ) {
+            this->selector = selector;
+        }
+
+        /**
+         * Gets the ID that is assigned to this consumer
+         * @return value of the Consumer Id.
+         */
+        virtual unsigned int getConsumerId(void) const {
+            return consumerId;
+        }
+
+        /**
+         * Sets the ID that is assigned to this consumer
+         * @param id value of the Consumer Id.
+         */
+        virtual void setConsumerId( const unsigned int id ) {
+            this->consumerId = id;
+        }
+
+        /**
+         * Gets the Destination that this Consumer is subscribed on
+         * @return Destination this consumer is attached to
+         */
+        virtual const cms::Destination& getDestination(void) const {
+            return *destination;
+        }
+
+        /**
+         * Sets the destination that this Consumer is listening on
+         * @param destination Destination this consumer is attached to
+         */
+        virtual void setDestination( const cms::Destination& destination ) {
+            this->destination = destination.clone();
+        }
+
+        /**
+         * Gets the Session Info that this consumer is attached too
+         * @return SessionnInfo pointer
+         */
+        virtual const SessionInfo* getSessionInfo(void) const {
+            return session;
+        }
+
+        /**
+         * Gets the Session Info that this consumer is attached too
+         * @param session SessionnInfo for this consumer
+         */
+        virtual void setSessionInfo( const SessionInfo* session ) {
+            this->session = session;
+        }
+
+    };
+
+}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRECONSUMERINFO_H_*/

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h?view=auto&rev=505724
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireProducerInfo.h
Sat Feb 10 09:06:11 2007
@@ -0,0 +1,106 @@
+/*
+ * 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 _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIREPRODUCERINFO_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIREPRODUCERINFO_H_
+
+#include <activemq/connector/ProducerInfo.h>
+#include <cms/Destination.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+
+    class OpenWireProducerInfo : public ProducerInfo {
+
+    private:
+
+        // Producer Id
+        unsigned int producerId;
+
+        // Default Destination
+        cms::Destination* destination;
+
+        // Session that this producer is attached to - we do not own this
+        const SessionInfo* session;
+
+    public:
+
+        OpenWireProducerInfo() {
+            destination = NULL;
+            producerId = 0;
+            session = NULL;
+        }
+
+        virtual ~OpenWireProducerInfo() {
+            delete destination;
+        }
+
+        /**
+         * Retrieves the default destination that this producer
+         * sends its messages to.
+         * @return Destionation, owned by this object
+         */
+        virtual const cms::Destination& getDestination(void) const {
+            return *destination;
+        }
+
+        /**
+         * Sets the Default Destination for this Producer
+         * @param destination reference to a destination, copied internally
+         */
+        virtual void setDestination( const cms::Destination& destination ) {
+            this->destination = destination.clone();
+        }
+
+        /**
+         * Gets the ID that is assigned to this Producer
+         * @return value of the Producer Id.
+         */
+        virtual unsigned int getProducerId(void) const {
+            return producerId;
+        }
+
+        /**
+         * Sets the ID that is assigned to this Producer
+         * @return id string value of the Producer Id.
+         */
+        virtual void setProducerId( const unsigned int id ) {
+            this->producerId = id;
+        }
+
+        /**
+         * Gets the Session Info that this consumer is attached too
+         * @return SessionnInfo pointer
+         */
+        virtual const SessionInfo* getSessionInfo(void) const {
+            return session;
+        }
+
+        /**
+         * Gets the Session Info that this consumer is attached too
+         * @return session SessionnInfo pointer
+         */
+        virtual void setSessionInfo( const SessionInfo* session ) {
+            this->session = session;
+        }
+
+    };
+
+}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIREPRODUCERINFO_H_*/

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h?view=auto&rev=505724
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireSessionInfo.h
Sat Feb 10 09:06:11 2007
@@ -0,0 +1,128 @@
+/*
+ * 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 _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRESESSIONINFO_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRESESSIONINFO_H_
+
+#include <activemq/connector/SessionInfo.h>
+#include <cms/Session.h>
+#include <string>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+
+    class OpenWireSessionInfo : public SessionInfo {
+
+    private:
+
+        // Acknowledge Mode of this Session
+        cms::Session::AcknowledgeMode ackMode;
+
+        // The id of the connection to the broker
+        // (given to us by the broker)
+        std::string connectionId;
+
+        // The unique session id
+        unsigned int sessionId;
+
+        // Info for this sessions current transaction
+        const TransactionInfo* transaction;
+
+    public:
+
+        OpenWireSessionInfo() {
+            sessionId = 0;
+            ackMode = cms::Session::AUTO_ACKNOWLEDGE;
+            transaction = NULL;
+        }
+        virtual ~OpenWireSessionInfo() {}
+
+        /**
+         * Gets the Connection Id of the Connection that this consumer is
+         * using to receive its messages.
+         * @return string value of the connection id
+         */
+        virtual const std::string& getConnectionId(void) const{
+            return connectionId;
+        }
+
+        /**
+         * Sets the Connection Id of the Connection that this consumer is
+         * using to receive its messages.
+         * @param id string value of the connection id
+         */
+        virtual void setConnectionId( const std::string& id ){
+            connectionId = id;
+        }
+
+        /**
+         * Gets the Sessions Id value
+         * @return id for this session
+         */
+        virtual unsigned int getSessionId(void) const {
+            return sessionId;
+        }
+
+        /**
+         * Sets the Session Id for this Session
+         * @param id integral id value for this session
+         */
+        virtual void setSessionId( const unsigned int id ) {
+            this->sessionId = id;
+        }
+
+        /**
+         * Sets the Ack Mode of this Session Info object
+         * @param ackMode Ack Mode
+         */
+        virtual void setAckMode(cms::Session::AcknowledgeMode ackMode) {
+            this->ackMode = ackMode;
+        }
+
+        /**
+         * Gets the Ack Mode of this Session
+         * @return Ack Mode
+         */
+        virtual cms::Session::AcknowledgeMode getAckMode(void) const {
+            return ackMode;
+        }
+
+        /**
+         * Gets the currently active transaction info, if this session is
+         * transacted, returns NULL when not transacted.  You must call
+         * getAckMode and see if the session is transacted.
+         * @return Transaction Id of current Transaction
+         */
+        virtual const TransactionInfo* getTransactionInfo(void) const {
+            return transaction;
+        }
+
+        /**
+         * Sets the current transaction info for this session, this is nit
+         * used when the session is not transacted.
+         * @param transaction Transaction Id
+         */
+        virtual void setTransactionInfo( const TransactionInfo* transaction ) {
+            this->transaction = transaction;
+        }
+
+    };
+
+}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRESESSIONINFO_H_*/

Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h?view=auto&rev=505724
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
(added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireTransactionInfo.h
Sat Feb 10 09:06:11 2007
@@ -0,0 +1,83 @@
+/*
+ * 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 _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRETRANSACTIONINFO_H_
+#define _ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRETRANSACTIONINFO_H_
+
+#include <activemq/connector/TransactionInfo.h>
+#include <activemq/connector/SessionInfo.h>
+
+namespace activemq{
+namespace connector{
+namespace openwire{
+
+    class OpenWireTransactionInfo : public TransactionInfo {
+
+    private:
+
+        // Transaction Id
+        unsigned int transactionId;
+
+        // Session Info - We do not own this
+        const SessionInfo* session;
+
+    public:
+
+        OpenWireTransactionInfo() {
+            transactionId = 0;
+            session = NULL;
+        }
+
+        virtual ~OpenWireTransactionInfo() {}
+
+        /**
+         * Gets the Transction Id
+         * @return unsigned int Id
+         */
+        virtual unsigned int getTransactionId(void) const {
+            return transactionId;
+        }
+
+        /**
+         * Sets the Transction Id
+         * @param id unsigned int Id
+         */
+        virtual void setTransactionId( const unsigned int id ) {
+            this->transactionId = id;
+        }
+
+        /**
+         * Gets the Session Info that this Transction is attached too
+         * @return SessionnInfo pointer
+         */
+        virtual const SessionInfo* getSessionInfo(void) const {
+            return session;
+        }
+
+        /**
+         * Gets the Session Info that this Transction is attached too
+         * @return session SessionnInfo pointer
+         */
+        virtual void setSessionInfo( const SessionInfo* session ) {
+            this->session = session;
+        }
+
+    };
+
+}}}
+
+#endif /*_ACTIVEMQ_CONNECTOR_OPENWIRE_OPENWIRETRANSACTIONINFO_H_*/

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h?view=diff&rev=505724&r1=505723&r2=505724
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompProducerInfo.h
Sat Feb 10 09:06:11 2007
@@ -28,20 +28,24 @@
     class StompProducerInfo : public ProducerInfo
     {
     private:
-    
+
         // Producer Id
         unsigned int producerId;
 
         // Default Destination
         cms::Destination* destination;
-        
+
         // Session that this producer is attached to - we do not own this
         const SessionInfo* session;
-        
+
     public:
 
-    	StompProducerInfo(void) { destination = NULL; }
-    	virtual ~StompProducerInfo(void) { delete destination; }
+        StompProducerInfo(void) {
+            producerId = 0;
+            session = NULL;
+            destination = NULL;
+        }
+        virtual ~StompProducerInfo(void) { delete destination; }
 
         /**
          * Retrieves the default destination that this producer
@@ -67,7 +71,7 @@
         virtual unsigned int getProducerId(void) const {
             return producerId;
         }
-        
+
         /**
          * Sets the ID that is assigned to this Producer
          * @return id string value of the Producer Id.

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h?view=diff&rev=505724&r1=505723&r2=505724
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionInfo.h
Sat Feb 10 09:06:11 2007
@@ -28,26 +28,27 @@
     class StompSessionInfo : public connector::SessionInfo
     {
     private:
-    
+
         // Acknowledge Mode of this Session
         cms::Session::AcknowledgeMode ackMode;
-        
-        // The id of the connection to the broker 
+
+        // The id of the connection to the broker
         // (given to us by the broker)
         std::string connectionId;
-        
+
         // The unique session id
         unsigned int sessionId;
-        
+
         // Info for this sessions current transaction
         const TransactionInfo* transaction;
-        
+
     public:
 
         StompSessionInfo(void)
         {
             sessionId = 0;
             ackMode = cms::Session::AUTO_ACKNOWLEDGE;
+            transaction = NULL;
         }
 
         virtual ~StompSessionInfo(void) {}
@@ -60,7 +61,7 @@
         virtual const std::string& getConnectionId(void) const{
             return connectionId;
         }
-   
+
         /**
          * Sets the Connection Id of the Connection that this consumer is
          * using to receive its messages.
@@ -69,7 +70,7 @@
         virtual void setConnectionId( const std::string& id ){
             connectionId = id;
         }
-        
+
         /**
          * Gets the Sessions Id value
          * @return id for this session
@@ -93,7 +94,7 @@
         virtual void setAckMode(cms::Session::AcknowledgeMode ackMode) {
             this->ackMode = ackMode;
         }
-        
+
         /**
          * Gets the Ack Mode of this Session
          * @return Ack Mode
@@ -101,7 +102,7 @@
         virtual cms::Session::AcknowledgeMode getAckMode(void) const {
             return ackMode;
         }
-        
+
         /**
          * Gets the currently active transaction info, if this session is
          * transacted, returns NULL when not transacted.  You must call
@@ -111,12 +112,12 @@
         virtual const TransactionInfo* getTransactionInfo(void) const {
             return transaction;
         }
-        
+
         /**
          * Sets the current transaction info for this session, this is nit
          * used when the session is not transacted.
          * @param transaction Transaction Id
-         */        
+         */
         virtual void setTransactionInfo( const TransactionInfo* transaction ) {
             this->transaction = transaction;
         }



Mime
View raw message