activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r508579 - in /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp: StompSessionManager.cpp StompSessionManager.h
Date Fri, 16 Feb 2007 20:55:43 GMT
Author: tabish
Date: Fri Feb 16 12:55:42 2007
New Revision: 508579

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

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp?view=diff&rev=508579&r1=508578&r2=508579
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
Fri Feb 16 12:55:42 2007
@@ -67,7 +67,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned int StompSessionManager::getNextSessionId(void)
+long long StompSessionManager::getNextSessionId(void)
 {
     synchronized( &mutex )
     {
@@ -78,7 +78,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned int StompSessionManager::getNextConsumerId(void)
+long long StompSessionManager::getNextConsumerId(void)
 {
     synchronized( &mutex )
     {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.h?view=diff&rev=508579&r1=508578&r2=508579
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.h
(original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.h
Fri Feb 16 12:55:42 2007
@@ -30,10 +30,10 @@
 namespace activemq{
 namespace connector{
 namespace stomp{
-    
+
     /**
      * The Stomp Session Manager is responsible for managing multiple
-     * Client Sessions.  The management involves routing messages to 
+     * Client Sessions.  The management involves routing messages to
      * sessions.  If more than one ActiveMQConsumer is created that is
      * listening to the same Topic or Queue, then the messages that are
      * received must be delivered to each of those sessions, and copied
@@ -43,39 +43,39 @@
     class StompSessionManager : public StompCommandListener
     {
     private:
-    
+
         // Map Types
-        typedef std::map< unsigned int, ConsumerInfo* > ConsumerMap;
-        typedef std::map< std::string, ConsumerMap >    DestinationMap;        
+        typedef std::map< long long, ConsumerInfo* > ConsumerMap;
+        typedef std::map< std::string, ConsumerMap > DestinationMap;
 
     private:
-    
+
         // Next id to be used for a Session Id
-        unsigned int nextSessionId;
-        
+        long long nextSessionId;
+
         // Next id to be used for a Consumer Id
-        unsigned int nextConsumerId;
-        
+        long long nextConsumerId;
+
         // Mutex to protect ids.
         concurrent::Mutex mutex;
-        
+
         // Mapping of a Session to all the consumer's
         DestinationMap destinationMap;
-        
+
         // Transport that we use to find a transport for sending
         // commands
         transport::Transport* transport;
-        
-        // Consumer Message listener, we notify this whenever we receive 
+
+        // Consumer Message listener, we notify this whenever we receive
         // a new StompMessage type command.
         ConsumerMessageListener* messageListener;
-        
+
         // The global connection id
         std::string connectionId;
-        
+
     public:
 
-    	StompSessionManager( const std::string& connectionId, 
+    	StompSessionManager( const std::string& connectionId,
                              transport::Transport* transport );
     	virtual ~StompSessionManager(void);
 
@@ -97,11 +97,11 @@
          */
         virtual void removeSession( connector::SessionInfo* session )
             throw ( exceptions::ActiveMQException );
-        
+
         /**
          * Creates a new consumer to the specified session, will subscribe
-         * to the destination if another consumer hasn't already been 
-         * subbed to that destination.  The returned consumer is the 
+         * to the destination if another consumer hasn't already been
+         * subbed to that destination.  The returned consumer is the
          * owned by the caller and not deleted by this class.
          * @param destination to subscribe to
          * @param session to associate with
@@ -109,16 +109,16 @@
          * @return new ConsumerInfo object.
          */
         virtual connector::ConsumerInfo* createConsumer(
-            const cms::Destination* destination, 
+            const cms::Destination* destination,
             SessionInfo* session,
             const std::string& selector = "",
             bool noLocal = false )
                 throw( StompConnectorException );
 
         /**
-         * Creates a new durable consumer to the specified session, will 
-         * subscribe to the destination if another consumer hasn't already 
-         * been subbed to that destination.  The returned consumer is the 
+         * Creates a new durable consumer to the specified session, will
+         * subscribe to the destination if another consumer hasn't already
+         * been subbed to that destination.  The returned consumer is the
          * owned by the caller and not deleted by this class.
          * @param destination Topic to subscribe to
          * @param session to associate with
@@ -128,7 +128,7 @@
          * @return new ConsumerInfo object.
          */
         virtual connector::ConsumerInfo* createDurableConsumer(
-            const cms::Destination* destination, 
+            const cms::Destination* destination,
             SessionInfo* session,
             const std::string& name,
             const std::string& selector = "",
@@ -142,11 +142,11 @@
          * caller is responsible for managing the lifetime.
          * @param consumer the ConsumerInfo for the consumer to remove
          * @throws ConnectorException
-         */            
+         */
         virtual void removeConsumer( connector::ConsumerInfo* consumer )
             throw( StompConnectorException );
 
-        /** 
+        /**
          * Sets the listener of consumer messages.
          * @param listener the observer.
          */
@@ -157,19 +157,19 @@
         }
 
     public:   // StompCommand Listener
-    
+
         /**
          * Process the Stomp Command
          * @param command to process
          * @throw ConnterException
          */
-        virtual void onStompCommand( commands::StompCommand* command ) 
+        virtual void onStompCommand( commands::StompCommand* command )
             throw ( StompConnectorException );
-            
-    protected: 
-    
+
+    protected:
+
         /**
-         * Sets Subscribe Command options from the properties of a 
+         * Sets Subscribe Command options from the properties of a
          * destination object.
          * @param destination The destination that we are subscribing to.
          * @param command The pending Subscribe command
@@ -177,20 +177,20 @@
         virtual void setSubscribeOptions( const cms::Destination* destination,
                                           commands::SubscribeCommand& command )
             throw ( StompConnectorException );
-            
+
     protected:
-    
+
         /**
          * Gets the Next Session Id
          * @return unique session id
          */
-        virtual unsigned int getNextSessionId(void);
-        
+        virtual long long getNextSessionId(void);
+
         /**
          * Gets the Next Session Id
          * @return unique session id
          */
-        virtual unsigned int getNextConsumerId(void);
+        virtual long long getNextConsumerId(void);
 
     };
 



Mime
View raw message