You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2010/01/27 20:50:13 UTC
svn commit: r903798 - in
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands:
ConnectionInfo.cpp ConnectionInfo.h ConsumerInfo.cpp ConsumerInfo.h
ProducerInfo.cpp ProducerInfo.h SessionInfo.cpp SessionInfo.h
Author: tabish
Date: Wed Jan 27 19:50:12 2010
New Revision: 903798
URL: http://svn.apache.org/viewvc?rev=903798&view=rev
Log:
Adds method createRemoveCommand to simplify the code that manages these resources.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.cpp Wed Jan 27 19:50:12 2010
@@ -307,3 +307,11 @@
return visitor->processConnectionInfo( this );
}
+////////////////////////////////////////////////////////////////////////////////
+Pointer<RemoveInfo> ConnectionInfo::createRemoveCommand() const {
+ Pointer<RemoveInfo> info( new RemoveInfo() );
+ info->setResponseRequired( this->isResponseRequired() );
+ info->setObjectId( this->getConnectionId() );
+ return info;
+}
+
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConnectionInfo.h Wed Jan 27 19:50:12 2010
@@ -26,6 +26,7 @@
#include <activemq/commands/BaseCommand.h>
#include <activemq/commands/BrokerId.h>
#include <activemq/commands/ConnectionId.h>
+#include <activemq/commands/RemoveInfo.h>
#include <activemq/util/Config.h>
#include <decaf/lang/Pointer.h>
#include <string>
@@ -108,6 +109,8 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ Pointer<RemoveInfo> createRemoveCommand() const;
+
virtual const Pointer<ConnectionId>& getConnectionId() const;
virtual Pointer<ConnectionId>& getConnectionId();
virtual void setConnectionId( const Pointer<ConnectionId>& connectionId );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.cpp Wed Jan 27 19:50:12 2010
@@ -521,3 +521,11 @@
return visitor->processConsumerInfo( this );
}
+////////////////////////////////////////////////////////////////////////////////
+Pointer<RemoveInfo> ConsumerInfo::createRemoveCommand() const {
+ Pointer<RemoveInfo> info( new RemoveInfo() );
+ info->setResponseRequired( this->isResponseRequired() );
+ info->setObjectId( this->getConsumerId() );
+ return info;
+}
+
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.h?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ConsumerInfo.h Wed Jan 27 19:50:12 2010
@@ -28,6 +28,7 @@
#include <activemq/commands/BooleanExpression.h>
#include <activemq/commands/BrokerId.h>
#include <activemq/commands/ConsumerId.h>
+#include <activemq/commands/RemoveInfo.h>
#include <activemq/util/Config.h>
#include <decaf/lang/Pointer.h>
#include <string>
@@ -120,6 +121,8 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ Pointer<RemoveInfo> createRemoveCommand() const;
+
virtual const Pointer<ConsumerId>& getConsumerId() const;
virtual Pointer<ConsumerId>& getConsumerId();
virtual void setConsumerId( const Pointer<ConsumerId>& consumerId );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.cpp?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.cpp Wed Jan 27 19:50:12 2010
@@ -254,3 +254,11 @@
return visitor->processProducerInfo( this );
}
+////////////////////////////////////////////////////////////////////////////////
+Pointer<RemoveInfo> ProducerInfo::createRemoveCommand() const {
+ Pointer<RemoveInfo> info( new RemoveInfo() );
+ info->setResponseRequired( this->isResponseRequired() );
+ info->setObjectId( this->getProducerId() );
+ return info;
+}
+
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.h?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/ProducerInfo.h Wed Jan 27 19:50:12 2010
@@ -27,6 +27,7 @@
#include <activemq/commands/BaseCommand.h>
#include <activemq/commands/BrokerId.h>
#include <activemq/commands/ProducerId.h>
+#include <activemq/commands/RemoveInfo.h>
#include <activemq/util/Config.h>
#include <decaf/lang/Pointer.h>
#include <string>
@@ -106,6 +107,8 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ Pointer<RemoveInfo> createRemoveCommand() const;
+
virtual const Pointer<ProducerId>& getProducerId() const;
virtual Pointer<ProducerId>& getProducerId();
virtual void setProducerId( const Pointer<ProducerId>& producerId );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.cpp Wed Jan 27 19:50:12 2010
@@ -152,3 +152,11 @@
return visitor->processSessionInfo( this );
}
+////////////////////////////////////////////////////////////////////////////////
+Pointer<RemoveInfo> SessionInfo::createRemoveCommand() const {
+ Pointer<RemoveInfo> info( new RemoveInfo() );
+ info->setResponseRequired( this->isResponseRequired() );
+ info->setObjectId( this->getSessionId() );
+ return info;
+}
+
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h?rev=903798&r1=903797&r2=903798&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/commands/SessionInfo.h Wed Jan 27 19:50:12 2010
@@ -24,6 +24,7 @@
#endif
#include <activemq/commands/BaseCommand.h>
+#include <activemq/commands/RemoveInfo.h>
#include <activemq/commands/SessionId.h>
#include <activemq/util/Config.h>
#include <decaf/lang/Pointer.h>
@@ -113,6 +114,8 @@
this->ackMode = mode;
}
+ Pointer<RemoveInfo> createRemoveCommand() const;
+
virtual const Pointer<SessionId>& getSessionId() const;
virtual Pointer<SessionId>& getSessionId();
virtual void setSessionId( const Pointer<SessionId>& sessionId );