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 2009/01/28 21:59:10 UTC
svn commit: r738619 [2/3] - in /activemq/activemq-cpp/trunk/src: main/
main/activemq/commands/ main/activemq/core/ main/activemq/state/
main/activemq/transport/ main/activemq/transport/correlator/
main/activemq/transport/failover/ main/activemq/transpo...
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/MessagePull.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -66,7 +67,7 @@
void MessagePull::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const MessagePull* srcPtr = dynamic_cast<const MessagePull*>( src );
@@ -127,7 +128,7 @@
} else {
stream << " Object is NULL" << std::endl;
}
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = MessagePull" << std::endl;
return stream.str();
@@ -167,13 +168,20 @@
} else if( valuePtr->getMessageId() != NULL ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* MessagePull::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processMessagePull( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const ConsumerId* MessagePull::getConsumerId() const {
return consumerId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/MessagePull.h Wed Jan 28 20:59:07 2009
@@ -44,7 +44,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API MessagePull : public BaseCommand<transport::Command> {
+ class AMQCPP_API MessagePull : public BaseCommand {
protected:
ConsumerId* consumerId;
@@ -98,6 +98,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const ConsumerId* getConsumerId() const;
virtual ConsumerId* getConsumerId();
virtual void setConsumerId( ConsumerId* consumerId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/NetworkBridgeFilter.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/NetworkBridgeFilter.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/NetworkBridgeFilter.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/NetworkBridgeFilter.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/NetworkBridgeFilter.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/PartialCommand.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/PartialCommand.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/PartialCommand.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/PartialCommand.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/PartialCommand.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/ProducerAck.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -61,7 +62,7 @@
void ProducerAck::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const ProducerAck* srcPtr = dynamic_cast<const ProducerAck*>( src );
@@ -98,7 +99,7 @@
stream << " Object is NULL" << std::endl;
}
stream << " Value of Size = " << this->getSize() << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = ProducerAck" << std::endl;
return stream.str();
@@ -121,13 +122,20 @@
if( this->getSize() != valuePtr->getSize() ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* ProducerAck::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processProducerAck( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const ProducerId* ProducerAck::getProducerId() const {
return producerId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerAck.h Wed Jan 28 20:59:07 2009
@@ -42,7 +42,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API ProducerAck : public BaseCommand<transport::Command> {
+ class AMQCPP_API ProducerAck : public BaseCommand {
protected:
ProducerId* producerId;
@@ -93,6 +93,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const ProducerId* getProducerId() const;
virtual ProducerId* getProducerId();
virtual void setProducerId( ProducerId* producerId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerId.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/ProducerId.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/ProducerInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -67,7 +68,7 @@
void ProducerInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const ProducerInfo* srcPtr = dynamic_cast<const ProducerInfo*>( src );
@@ -134,7 +135,7 @@
}
stream << " Value of DispatchAsync = " << this->isDispatchAsync() << std::endl;
stream << " Value of WindowSize = " << this->getWindowSize() << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = ProducerInfo" << std::endl;
return stream.str();
@@ -176,13 +177,20 @@
if( this->getWindowSize() != valuePtr->getWindowSize() ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* ProducerInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processProducerInfo( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const ProducerId* ProducerInfo::getProducerId() const {
return producerId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ProducerInfo.h Wed Jan 28 20:59:07 2009
@@ -44,7 +44,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API ProducerInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API ProducerInfo : public BaseCommand {
protected:
ProducerId* producerId;
@@ -98,6 +98,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const ProducerId* getProducerId() const;
virtual ProducerId* getProducerId();
virtual void setProducerId( ProducerId* producerId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/RemoveInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -60,7 +61,7 @@
void RemoveInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const RemoveInfo* srcPtr = dynamic_cast<const RemoveInfo*>( src );
@@ -95,7 +96,7 @@
} else {
stream << " Object is NULL" << std::endl;
}
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = RemoveInfo" << std::endl;
return stream.str();
@@ -115,13 +116,20 @@
} else if( valuePtr->getObjectId() != NULL ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* RemoveInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processRemoveInfo( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const DataStructure* RemoveInfo::getObjectId() const {
return objectId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveInfo.h Wed Jan 28 20:59:07 2009
@@ -42,7 +42,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API RemoveInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API RemoveInfo : public BaseCommand {
protected:
DataStructure* objectId;
@@ -92,6 +92,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const DataStructure* getObjectId() const;
virtual DataStructure* getObjectId();
virtual void setObjectId( DataStructure* objectId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/RemoveSubscriptionInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -62,7 +63,7 @@
void RemoveSubscriptionInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const RemoveSubscriptionInfo* srcPtr = dynamic_cast<const RemoveSubscriptionInfo*>( src );
@@ -101,7 +102,7 @@
}
stream << " Value of SubcriptionName = " << this->getSubcriptionName() << std::endl;
stream << " Value of ClientId = " << this->getClientId() << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = RemoveSubscriptionInfo" << std::endl;
return stream.str();
@@ -127,13 +128,20 @@
if( this->getClientId() != valuePtr->getClientId() ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* RemoveSubscriptionInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processRemoveSubscriptionInfo( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const ConnectionId* RemoveSubscriptionInfo::getConnectionId() const {
return connectionId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/RemoveSubscriptionInfo.h Wed Jan 28 20:59:07 2009
@@ -42,7 +42,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API RemoveSubscriptionInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API RemoveSubscriptionInfo : public BaseCommand {
protected:
ConnectionId* connectionId;
@@ -94,6 +94,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const ConnectionId* getConnectionId() const;
virtual ConnectionId* getConnectionId();
virtual void setConnectionId( ConnectionId* connectionId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/ReplayCommand.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -60,7 +61,7 @@
void ReplayCommand::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const ReplayCommand* srcPtr = dynamic_cast<const ReplayCommand*>( src );
@@ -88,7 +89,7 @@
stream << " Value of ReplayCommand::ID_REPLAYCOMMAND = 65" << std::endl;
stream << " Value of FirstNakNumber = " << this->getFirstNakNumber() << std::endl;
stream << " Value of LastNakNumber = " << this->getLastNakNumber() << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = ReplayCommand" << std::endl;
return stream.str();
@@ -107,13 +108,20 @@
if( this->getLastNakNumber() != valuePtr->getLastNakNumber() ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* ReplayCommand::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processReplayCommand( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
int ReplayCommand::getFirstNakNumber() const {
return firstNakNumber;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ReplayCommand.h Wed Jan 28 20:59:07 2009
@@ -41,7 +41,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API ReplayCommand : public BaseCommand<transport::Command> {
+ class AMQCPP_API ReplayCommand : public BaseCommand {
protected:
int firstNakNumber;
@@ -92,6 +92,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual int getFirstNakNumber() const;
virtual void setFirstNakNumber( int firstNakNumber );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/Response.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -59,7 +60,7 @@
void Response::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Response>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const Response* srcPtr = dynamic_cast<const Response*>( src );
@@ -85,7 +86,7 @@
stream << "Begin Class = Response" << std::endl;
stream << " Value of Response::ID_RESPONSE = 30" << std::endl;
stream << " Value of CorrelationId = " << this->getCorrelationId() << std::endl;
- stream << BaseCommand<transport::Response>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = Response" << std::endl;
return stream.str();
@@ -101,13 +102,20 @@
if( this->getCorrelationId() != valuePtr->getCorrelationId() ) {
return false;
}
- if( !BaseCommand<transport::Response>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* Response::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processResponse( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
int Response::getCorrelationId() const {
return correlationId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/Response.h Wed Jan 28 20:59:07 2009
@@ -41,7 +41,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API Response : public BaseCommand<transport::Response> {
+ class AMQCPP_API Response : public BaseCommand {
protected:
int correlationId;
@@ -91,6 +91,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual int getCorrelationId() const;
virtual void setCorrelationId( int correlationId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionId.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/SessionId.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/SessionInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -60,7 +61,7 @@
void SessionInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const SessionInfo* srcPtr = dynamic_cast<const SessionInfo*>( src );
@@ -95,7 +96,7 @@
} else {
stream << " Object is NULL" << std::endl;
}
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = SessionInfo" << std::endl;
return stream.str();
@@ -115,13 +116,20 @@
} else if( valuePtr->getSessionId() != NULL ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* SessionInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processSessionInfo( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const SessionId* SessionInfo::getSessionId() const {
return sessionId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SessionInfo.h Wed Jan 28 20:59:07 2009
@@ -42,7 +42,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API SessionInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API SessionInfo : public BaseCommand {
protected:
SessionId* sessionId;
@@ -92,6 +92,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const SessionId* getSessionId() const;
virtual SessionId* getSessionId();
virtual void setSessionId( SessionId* sessionId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/ShutdownInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -58,7 +59,7 @@
void ShutdownInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const ShutdownInfo* srcPtr = dynamic_cast<const ShutdownInfo*>( src );
@@ -82,7 +83,7 @@
stream << "Begin Class = ShutdownInfo" << std::endl;
stream << " Value of ShutdownInfo::ID_SHUTDOWNINFO = 11" << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = ShutdownInfo" << std::endl;
return stream.str();
@@ -95,9 +96,16 @@
if( valuePtr == NULL || value == NULL ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
+////////////////////////////////////////////////////////////////////////////////
+commands::Command* ShutdownInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processShutdownInfo( this );
+}
+
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/ShutdownInfo.h Wed Jan 28 20:59:07 2009
@@ -41,7 +41,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API ShutdownInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API ShutdownInfo : public BaseCommand {
protected:
@@ -90,6 +90,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
};
}}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/SubscriptionInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/SubscriptionInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionId.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/TransactionId.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/TransactionInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -63,7 +64,7 @@
void TransactionInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseCommand<transport::Command>::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const TransactionInfo* srcPtr = dynamic_cast<const TransactionInfo*>( src );
@@ -111,7 +112,7 @@
stream << " Object is NULL" << std::endl;
}
stream << " Value of Type = " << (int)this->getType() << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = TransactionInfo" << std::endl;
return stream.str();
@@ -141,13 +142,20 @@
if( this->getType() != valuePtr->getType() ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
return true;
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* TransactionInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processTransactionInfo( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
const ConnectionId* TransactionInfo::getConnectionId() const {
return connectionId;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/TransactionInfo.h Wed Jan 28 20:59:07 2009
@@ -43,7 +43,7 @@
* in the activemq-openwire-generator module
*
*/
- class AMQCPP_API TransactionInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API TransactionInfo : public BaseCommand {
protected:
ConnectionId* connectionId;
@@ -95,6 +95,16 @@
*/
virtual bool equals( const DataStructure* value ) const;
+ /**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
virtual const ConnectionId* getConnectionId() const;
virtual ConnectionId* getConnectionId();
virtual void setConnectionId( ConnectionId* connectionId );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.cpp Wed Jan 28 20:59:07 2009
@@ -17,6 +17,7 @@
#include <activemq/commands/WireFormatInfo.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/wireformat/openwire/marshal/PrimitiveMapMarshaller.h>
#include <decaf/lang/exceptions/NullPointerException.h>
@@ -66,7 +67,7 @@
void WireFormatInfo::copyDataStructure( const DataStructure* src ) {
// Copy the data of the base class or classes
- BaseDataStructure::copyDataStructure( src );
+ BaseCommand::copyDataStructure( src );
const WireFormatInfo* srcPtr = dynamic_cast<const WireFormatInfo*>( src );
@@ -111,7 +112,7 @@
stream << " Value of tightEncodingEnabled = " << isTightEncodingEnabled() << std::endl;
stream << " Value of sizePrefixDisabled = " << isSizePrefixDisabled() << std::endl;
- stream << BaseCommand<transport::Command>::toString();
+ stream << BaseCommand::toString();
stream << "End Class = WireFormatInfo" << std::endl;
return stream.str();
@@ -154,7 +155,7 @@
if( isSizePrefixDisabled() != wireFormatInfo->isSizePrefixDisabled() ) {
return false;
}
- if( !BaseCommand<transport::Command>::equals( value ) ) {
+ if( !BaseCommand::equals( value ) ) {
return false;
}
@@ -162,6 +163,13 @@
}
////////////////////////////////////////////////////////////////////////////////
+commands::Command* WireFormatInfo::visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException ) {
+
+ return visitor->processWireFormat( this );
+}
+
+////////////////////////////////////////////////////////////////////////////////
bool WireFormatInfo::isValid() const {
if( magic.size() != std::string( "ActiveMQ" ).size() ) {
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/WireFormatInfo.h Wed Jan 28 20:59:07 2009
@@ -20,7 +20,6 @@
#include <activemq/util/Config.h>
#include <activemq/commands/BaseCommand.h>
-#include <activemq/transport/Command.h>
#include <activemq/util/PrimitiveMap.h>
#include <activemq/exceptions/ActiveMQException.h>
@@ -29,7 +28,7 @@
namespace activemq{
namespace commands{
- class AMQCPP_API WireFormatInfo : public BaseCommand<transport::Command> {
+ class AMQCPP_API WireFormatInfo : public BaseCommand {
public:
const static unsigned char ID_WIREFORMATINFO = 1;
@@ -85,6 +84,16 @@
}
/**
+ * Allows a Visitor to visit this command and return a response to the
+ * command based on the command type being visited. The command will call
+ * the proper processXXX method in the visitor.
+ *
+ * @return a Response to the visitor being called or NULL if no response.
+ */
+ virtual commands::Command* visit( activemq::state::CommandVisitor* visitor )
+ throw( exceptions::ActiveMQException );
+
+ /**
* Get the current Wireformat Version
* @return int that identifies the version
*/
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/XATransactionId.cpp Wed Jan 28 20:59:07 2009
@@ -15,6 +15,7 @@
* limitations under the License.
*/
#include <activemq/commands/XATransactionId.h>
+#include <activemq/state/CommandVisitor.h>
#include <activemq/exceptions/ActiveMQException.h>
#include <decaf/lang/exceptions/NullPointerException.h>
Modified: activemq/activemq-cpp/trunk/src/main/activemq/commands/srcmakefile.mk
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/commands/srcmakefile.mk?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/commands/srcmakefile.mk (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/commands/srcmakefile.mk Wed Jan 28 20:59:07 2009
@@ -29,6 +29,7 @@
activemq/commands/ActiveMQTempTopic.cpp \
activemq/commands/ActiveMQTextMessage.cpp \
activemq/commands/ActiveMQTopic.cpp \
+ activemq/commands/BrokerError.cpp \
activemq/commands/BrokerId.cpp \
activemq/commands/BrokerInfo.cpp \
activemq/commands/ConnectionControl.cpp \
@@ -98,6 +99,7 @@
activemq/commands/BrokerError.h \
activemq/commands/BrokerId.h \
activemq/commands/BrokerInfo.h \
+ activemq/commands/Command.h \
activemq/commands/ConnectionControl.h \
activemq/commands/ConnectionError.h \
activemq/commands/ConnectionId.h \
Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.cpp Wed Jan 28 20:59:07 2009
@@ -22,13 +22,14 @@
#include <activemq/core/ActiveMQSession.h>
#include <activemq/core/ActiveMQProducer.h>
#include <activemq/core/ActiveMQConstants.h>
-#include <activemq/transport/Response.h>
+#include <activemq/exceptions/ActiveMQException.h>
#include <activemq/exceptions/BrokerException.h>
#include <decaf/lang/Boolean.h>
#include <decaf/util/Iterator.h>
#include <decaf/util/UUID.h>
+#include <activemq/commands/Command.h>
#include <activemq/commands/ActiveMQMessage.h>
#include <activemq/commands/BrokerInfo.h>
#include <activemq/commands/BrokerError.h>
@@ -432,7 +433,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::onCommand( transport::Command* command ) {
+void ActiveMQConnection::onCommand( commands::Command* command ) {
try{
@@ -556,7 +557,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::oneway( transport::Command* command )
+void ActiveMQConnection::oneway( commands::Command* command )
throw ( ActiveMQException ) {
try {
@@ -570,14 +571,14 @@
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::syncRequest( transport::Command* command, unsigned int timeout )
+void ActiveMQConnection::syncRequest( commands::Command* command, unsigned int timeout )
throw ( ActiveMQException ) {
try {
enforceConnected();
- std::auto_ptr<transport::Response> response;
+ std::auto_ptr<commands::Response> response;
if( timeout == 0 ) {
response.reset( this->getTransport().request( command ) );
Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQConnection.h Wed Jan 28 20:59:07 2009
@@ -299,14 +299,14 @@
exceptionListener = listener;
};
- public: // transport::CommandListener
+ public: // commands::CommandListener
/**
* Event handler for the receipt of a non-response command from the
* transport.
* @param command the received command object.
*/
- virtual void onCommand( transport::Command* command );
+ virtual void onCommand( commands::Command* command );
public: // TransportExceptionListener
@@ -340,7 +340,7 @@
* @throws ConnectorException if not currently connected, or
* if the operation fails for any reason.
*/
- void oneway( transport::Command* command )
+ void oneway( commands::Command* command )
throw ( activemq::exceptions::ActiveMQException );
/**
@@ -351,7 +351,7 @@
* @throws ConnectorException thrown if an error response was received
* from the broker, or if any other error occurred.
*/
- void syncRequest( transport::Command* command, unsigned int timeout = 0 )
+ void syncRequest( commands::Command* command, unsigned int timeout = 0 )
throw ( activemq::exceptions::ActiveMQException );
/**
Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.cpp Wed Jan 28 20:59:07 2009
@@ -934,7 +934,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::oneway( transport::Command* command )
+void ActiveMQSession::oneway( commands::Command* command )
throw ( activemq::exceptions::ActiveMQException ) {
try{
@@ -947,7 +947,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::syncRequest( transport::Command* command, unsigned int timeout )
+void ActiveMQSession::syncRequest( commands::Command* command, unsigned int timeout )
throw ( activemq::exceptions::ActiveMQException ) {
try{
Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h Wed Jan 28 20:59:07 2009
@@ -395,7 +395,7 @@
* @throws ConnectorException if not currently connected, or
* if the operation fails for any reason.
*/
- void oneway( transport::Command* command )
+ void oneway( commands::Command* command )
throw ( activemq::exceptions::ActiveMQException );
/**
@@ -406,7 +406,7 @@
* @throws ConnectorException thrown if an error response was received
* from the broker, or if any other error occurred.
*/
- void syncRequest( transport::Command* command, unsigned int timeout = 0 )
+ void syncRequest( commands::Command* command, unsigned int timeout = 0 )
throw ( activemq::exceptions::ActiveMQException );
/**
Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitor.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitor.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitor.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitor.h Wed Jan 28 20:59:07 2009
@@ -19,37 +19,42 @@
#define _ACTIVEMQ_STATE_COMMANDVISITOR_H_
#include <activemq/util/Config.h>
-#include <activemq/transport/Response.h>
#include <activemq/exceptions/ActiveMQException.h>
-#include <activemq/commands/ConnectionInfo.h>
-#include <activemq/commands/SessionInfo.h>
-#include <activemq/commands/ProducerInfo.h>
-#include <activemq/commands/ConsumerInfo.h>
-#include <activemq/commands/ConnectionId.h>
-#include <activemq/commands/SessionId.h>
-#include <activemq/commands/ProducerId.h>
-#include <activemq/commands/ConsumerId.h>
-#include <activemq/commands/DestinationInfo.h>
-#include <activemq/commands/RemoveSubscriptionInfo.h>
-#include <activemq/commands/Message.h>
-#include <activemq/commands/MessageAck.h>
-#include <activemq/commands/MessagePull.h>
-#include <activemq/commands/TransactionInfo.h>
-#include <activemq/commands/WireFormatInfo.h>
-#include <activemq/commands/ProducerAck.h>
-#include <activemq/commands/MessageDispatch.h>
-#include <activemq/commands/MessageDispatchNotification.h>
-#include <activemq/commands/ControlCommand.h>
-#include <activemq/commands/ConnectionError.h>
-#include <activemq/commands/ConnectionControl.h>
-#include <activemq/commands/ConsumerControl.h>
-#include <activemq/commands/ShutdownInfo.h>
-#include <activemq/commands/KeepAliveInfo.h>
-#include <activemq/commands/FlushCommand.h>
-#include <activemq/commands/BrokerInfo.h>
-
namespace activemq {
+namespace commands {
+ class Command;
+ class ConnectionInfo;
+ class SessionInfo;
+ class ProducerInfo;
+ class ConnectionId;
+ class SessionId;
+ class ProducerId;
+ class ConsumerId;
+ class ConsumerInfo;
+ class DestinationInfo;
+ class RemoveSubscriptionInfo;
+ class Message;
+ class MessageAck;
+ class MessagePull;
+ class TransactionInfo;
+ class WireFormatInfo;
+ class ProducerAck;
+ class MessageDispatch;
+ class MessageDispatchNotification;
+ class ControlCommand;
+ class ConnectionError;
+ class ConnectionControl;
+ class ConsumerControl;
+ class ShutdownInfo;
+ class KeepAliveInfo;
+ class FlushCommand;
+ class BrokerError;
+ class BrokerInfo;
+ class RemoveInfo;
+ class Response;
+ class ReplayCommand;
+}
namespace state {
/**
@@ -65,107 +70,122 @@
virtual ~CommandVisitor() {}
- virtual transport::Response* processAddConnection(
- commands::ConnectionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processTransactionInfo(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
+
+ virtual commands::Command* processRemoveInfo(
+ commands::RemoveInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
+
+ virtual commands::Command* processConnectionInfo(
+ commands::ConnectionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
+
+ virtual commands::Command* processSessionInfo(
+ commands::SessionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
+
+ virtual commands::Command* processProducerInfo(
+ commands::ProducerInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
+
+ virtual commands::Command* processConsumerInfo(
+ commands::ConsumerInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processAddSession(
- commands::SessionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRemoveConnection(
+ commands::ConnectionId* id ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processAddProducer(
- commands::ProducerInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRemoveSession(
+ commands::SessionId* id ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processAddConsumer(
- commands::ConsumerInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRemoveProducer(
+ commands::ProducerId* id ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRemoveConnection(
- commands::ConnectionId id ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRemoveConsumer(
+ commands::ConsumerId* id ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRemoveSession(
- commands::SessionId id ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processDestinationInfo(
+ commands::DestinationInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRemoveProducer(
- commands::ProducerId id ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRemoveDestination(
+ commands::DestinationInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRemoveConsumer(
- commands::ConsumerId id ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRemoveSubscriptionInfo(
+ commands::RemoveSubscriptionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processAddDestination(
- commands::DestinationInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processMessage(
+ commands::Message* send ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRemoveDestination(
- commands::DestinationInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processMessageAck(
+ commands::MessageAck* ack ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRemoveSubscription(
- commands::RemoveSubscriptionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processMessagePull(
+ commands::MessagePull* pull ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processMessage(
- commands::Message send ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processBeginTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processMessageAck(
- commands::MessageAck ack ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processPrepareTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processMessagePull(
- commands::MessagePull pull ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processCommitTransactionOnePhase(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processBeginTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processCommitTransactionTwoPhase(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processPrepareTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRollbackTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processCommitTransactionOnePhase(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processWireFormat(
+ commands::WireFormatInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processCommitTransactionTwoPhase(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processKeepAliveInfo(
+ commands::KeepAliveInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRollbackTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processShutdownInfo(
+ commands::ShutdownInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processWireFormat(
- commands::WireFormatInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processFlushCommand(
+ commands::FlushCommand* command ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processKeepAlive(
- commands::KeepAliveInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processBrokerInfo(
+ commands::BrokerInfo* info) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processShutdown(
- commands::ShutdownInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processRecoverTransactions(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processFlush(
- commands::FlushCommand command ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processForgetTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processBrokerInfo(
- commands::BrokerInfo info) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processEndTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processRecoverTransactions(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processMessageDispatchNotification(
+ commands::MessageDispatchNotification* notification ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processForgetTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processProducerAck(
+ commands::ProducerAck* ack ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processEndTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processMessageDispatch(
+ commands::MessageDispatch* dispatch ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processMessageDispatchNotification(
- commands::MessageDispatchNotification notification ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processControlCommand(
+ commands::ControlCommand* command ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processProducerAck(
- commands::ProducerAck ack ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processConnectionError(
+ commands::ConnectionError* error ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processMessageDispatch(
- commands::MessageDispatch dispatch ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processConnectionControl(
+ commands::ConnectionControl* control ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processControlCommand(
- commands::ControlCommand command ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processConsumerControl(
+ commands::ConsumerControl* control ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processConnectionError(
- commands::ConnectionError error ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processBrokerError(
+ commands::BrokerError* error ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processConnectionControl(
- commands::ConnectionControl control ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processReplayCommand(
+ commands::ReplayCommand* replay ) throw ( exceptions::ActiveMQException ) = 0;
- virtual transport::Response* processConsumerControl(
- commands::ConsumerControl control ) throw ( exceptions::ActiveMQException ) = 0;
+ virtual commands::Command* processResponse(
+ commands::Response* response ) throw ( exceptions::ActiveMQException ) = 0;
};
Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitorAdapter.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitorAdapter.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitorAdapter.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/CommandVisitorAdapter.h Wed Jan 28 20:59:07 2009
@@ -22,6 +22,38 @@
#include <activemq/state/CommandVisitor.h>
+#include <activemq/commands/ConnectionInfo.h>
+#include <activemq/commands/SessionInfo.h>
+#include <activemq/commands/ProducerInfo.h>
+#include <activemq/commands/ConsumerInfo.h>
+#include <activemq/commands/ConnectionId.h>
+#include <activemq/commands/SessionId.h>
+#include <activemq/commands/ProducerId.h>
+#include <activemq/commands/ConsumerId.h>
+#include <activemq/commands/DestinationInfo.h>
+#include <activemq/commands/RemoveSubscriptionInfo.h>
+#include <activemq/commands/Message.h>
+#include <activemq/commands/MessageAck.h>
+#include <activemq/commands/MessagePull.h>
+#include <activemq/commands/TransactionInfo.h>
+#include <activemq/commands/WireFormatInfo.h>
+#include <activemq/commands/ProducerAck.h>
+#include <activemq/commands/MessageDispatch.h>
+#include <activemq/commands/MessageDispatchNotification.h>
+#include <activemq/commands/ControlCommand.h>
+#include <activemq/commands/ConnectionInfo.h>
+#include <activemq/commands/ConnectionError.h>
+#include <activemq/commands/ConnectionControl.h>
+#include <activemq/commands/ConsumerControl.h>
+#include <activemq/commands/ShutdownInfo.h>
+#include <activemq/commands/KeepAliveInfo.h>
+#include <activemq/commands/FlushCommand.h>
+#include <activemq/commands/BrokerError.h>
+#include <activemq/commands/BrokerInfo.h>
+#include <activemq/commands/RemoveInfo.h>
+#include <activemq/commands/ReplayCommand.h>
+#include <activemq/commands/Response.h>
+
namespace activemq {
namespace state {
@@ -35,206 +67,236 @@
virtual ~CommandVisitorAdapter() {}
- virtual transport::Response* processAddConnection(
- commands::ConnectionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processTransactionInfo(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
+
+ return NULL;
+ }
+
+ virtual commands::Command* processConnectionInfo(
+ commands::ConnectionInfo* info ) throw ( exceptions::ActiveMQException ) {
+
+ return NULL;
+ }
+
+ virtual commands::Command* processSessionInfo(
+ commands::SessionInfo* info ) throw ( exceptions::ActiveMQException ) {
+
+ return NULL;
+ }
+
+ virtual commands::Command* processProducerInfo(
+ commands::ProducerInfo* info ) throw ( exceptions::ActiveMQException ) {
+
+ return NULL;
+ }
+
+ virtual commands::Command* processConsumerInfo(
+ commands::ConsumerInfo* info ) throw ( exceptions::ActiveMQException ) {
+
+ return NULL;
+ }
+
+ virtual commands::Command* processRemoveConnection(
+ commands::ConnectionId* id ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processAddSession(
- commands::SessionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRemoveSession(
+ commands::SessionId* id ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processAddProducer(
- commands::ProducerInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRemoveProducer(
+ commands::ProducerId* id ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processAddConsumer(
- commands::ConsumerInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRemoveConsumer(
+ commands::ConsumerId* id ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRemoveConnection(
- commands::ConnectionId id ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processDestinationInfo(
+ commands::DestinationInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRemoveSession(
- commands::SessionId id ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRemoveDestination(
+ commands::DestinationInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRemoveProducer(
- commands::ProducerId id ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRemoveSubscriptionInfo(
+ commands::RemoveSubscriptionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRemoveConsumer(
- commands::ConsumerId id ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processMessage(
+ commands::Message* send ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processAddDestination(
- commands::DestinationInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processMessageAck(
+ commands::MessageAck* ack ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRemoveDestination(
- commands::DestinationInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processMessagePull(
+ commands::MessagePull* pull ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRemoveSubscription(
- commands::RemoveSubscriptionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processBeginTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processMessage(
- commands::Message send ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processPrepareTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processMessageAck(
- commands::MessageAck ack ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processCommitTransactionOnePhase(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processMessagePull(
- commands::MessagePull pull ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processCommitTransactionTwoPhase(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processBeginTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRollbackTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processPrepareTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processWireFormat(
+ commands::WireFormatInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processCommitTransactionOnePhase(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processKeepAliveInfo(
+ commands::KeepAliveInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processCommitTransactionTwoPhase(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processShutdownInfo(
+ commands::ShutdownInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRollbackTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processFlushCommand(
+ commands::FlushCommand* command ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processWireFormat(
- commands::WireFormatInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processBrokerInfo(
+ commands::BrokerInfo* info) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processKeepAlive(
- commands::KeepAliveInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRecoverTransactions(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processShutdown(
- commands::ShutdownInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processForgetTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processFlush(
- commands::FlushCommand command ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processEndTransaction(
+ commands::TransactionInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processBrokerInfo(
- commands::BrokerInfo info) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processMessageDispatchNotification(
+ commands::MessageDispatchNotification* notification ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processRecoverTransactions(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processProducerAck(
+ commands::ProducerAck* ack ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processForgetTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processMessageDispatch(
+ commands::MessageDispatch* dispatch ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processEndTransaction(
- commands::TransactionInfo info ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processControlCommand(
+ commands::ControlCommand* command ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processMessageDispatchNotification(
- commands::MessageDispatchNotification notification ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processConnectionError(
+ commands::ConnectionError* error ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processProducerAck(
- commands::ProducerAck ack ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processConnectionControl(
+ commands::ConnectionControl* control ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processMessageDispatch(
- commands::MessageDispatch dispatch ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processConsumerControl(
+ commands::ConsumerControl* control ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processControlCommand(
- commands::ControlCommand command ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processBrokerError(
+ commands::BrokerError* error ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processConnectionError(
- commands::ConnectionError error ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processRemoveInfo(
+ commands::RemoveInfo* info ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processConnectionControl(
- commands::ConnectionControl control ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processReplayCommand(
+ commands::ReplayCommand* replay ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
- virtual transport::Response* processConsumerControl(
- commands::ConsumerControl control ) throw ( exceptions::ActiveMQException ) {
+ virtual commands::Command* processResponse(
+ commands::Response* response ) throw ( exceptions::ActiveMQException ) {
return NULL;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.cpp Wed Jan 28 20:59:07 2009
@@ -21,7 +21,6 @@
using namespace activemq;
using namespace activemq::state;
-using namespace activemq::transport;
using namespace activemq::exceptions;
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/Tracked.h Wed Jan 28 20:59:07 2009
@@ -19,13 +19,13 @@
#define _ACTIVEMQ_STATE_TRACKED_H_
#include <activemq/util/Config.h>
-#include <activemq/transport/Response.h>
+#include <activemq/commands/Response.h>
#include <decaf/lang/Runnable.h>
namespace activemq {
namespace state {
- class AMQCPP_API Tracked : public transport::Response {
+ class AMQCPP_API Tracked : public commands::Response {
private:
decaf::lang::Runnable* runnable;
Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.cpp Wed Jan 28 20:59:07 2009
@@ -21,7 +21,6 @@
using namespace activemq;
using namespace activemq::state;
-using namespace activemq::transport;
using namespace decaf;
using namespace decaf::util;
@@ -36,7 +35,7 @@
////////////////////////////////////////////////////////////////////////////////
TransactionState::~TransactionState() {
- std::auto_ptr< Iterator<Command*> > iter( this->commands.iterator() );
+ std::auto_ptr< Iterator<commands::Command*> > iter( this->commands.iterator() );
while( iter->hasNext() ) {
delete iter->next();
@@ -54,11 +53,12 @@
}
////////////////////////////////////////////////////////////////////////////////
-void TransactionState::addCommand( transport::Command* operation ) {
+void TransactionState::addCommand( commands::Command* operation ) {
checkShutdown();
- commands.add( operation->cloneCommand() );
+ commands.add(
+ dynamic_cast<commands::Command*>( operation->cloneDataStructure() ) );
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/state/TransactionState.h Wed Jan 28 20:59:07 2009
@@ -19,7 +19,7 @@
#define _ACTIVEMQ_STATE_TRANSACTIONSTATE_H_
#include <activemq/util/Config.h>
-#include <activemq/transport/Command.h>
+#include <activemq/commands/Command.h>
#include <activemq/commands/TransactionId.h>
#include <decaf/util/List.h>
@@ -34,7 +34,7 @@
class AMQCPP_API TransactionState {
private:
- decaf::util::List<transport::Command*> commands;
+ decaf::util::List<commands::Command*> commands;
std::auto_ptr<commands::TransactionId> id;
decaf::util::concurrent::atomic::AtomicBoolean disposed;
bool prepared;
@@ -48,7 +48,7 @@
std::string toString() const;
- void addCommand( transport::Command* operation );
+ void addCommand( commands::Command* operation );
void checkShutdown() const;
@@ -56,7 +56,7 @@
this->disposed.set( true );
}
- const decaf::util::List<transport::Command*>& getCommands() {
+ const decaf::util::List<commands::Command*>& getCommands() {
return commands;
}
Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/DefaultTransportListener.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/DefaultTransportListener.h?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/DefaultTransportListener.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/DefaultTransportListener.h Wed Jan 28 20:59:07 2009
@@ -20,6 +20,7 @@
#include <activemq/util/Config.h>
#include <activemq/transport/TransportListener.h>
+#include <activemq/commands/Command.h>
namespace activemq {
namespace transport {
@@ -37,7 +38,7 @@
*
* @param command the received command object.
*/
- virtual void onCommand( Command* command AMQCPP_UNUSED ) {}
+ virtual void onCommand( commands::Command* command AMQCPP_UNUSED ) {}
/**
* Event handler for an exception from a command transport.
Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp?rev=738619&r1=738618&r2=738619&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp Wed Jan 28 20:59:07 2009
@@ -76,7 +76,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-void IOTransport::fire( Command* command ){
+void IOTransport::fire( commands::Command* command ){
try{
// Since the listener is responsible for freeing the memory,
@@ -98,7 +98,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-void IOTransport::oneway( Command* command )
+void IOTransport::oneway( commands::Command* command )
throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ) {
try{
@@ -225,7 +225,7 @@
while( !closed ){
// Read the next command from the input stream.
- Command* command = wireFormat->unmarshal( this->inputStream );
+ commands::Command* command = wireFormat->unmarshal( this->inputStream );
// Notify the listener.
fire( command );
@@ -253,7 +253,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-Response* IOTransport::request( Command* command AMQCPP_UNUSED )
+commands::Response* IOTransport::request( commands::Command* command AMQCPP_UNUSED )
throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ){
throw decaf::lang::exceptions::UnsupportedOperationException(
@@ -262,7 +262,7 @@
}
////////////////////////////////////////////////////////////////////////////////
-Response* IOTransport::request( Command* command AMQCPP_UNUSED, unsigned int timeout AMQCPP_UNUSED )
+commands::Response* IOTransport::request( commands::Command* command AMQCPP_UNUSED, unsigned int timeout AMQCPP_UNUSED )
throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ){
throw decaf::lang::exceptions::UnsupportedOperationException(