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 2007/02/21 21:20:51 UTC
svn commit: r510183 - in /activemq/activemq-cpp/trunk/activemq-cpp/src:
main/activemq/connector/ main/activemq/connector/openwire/
main/activemq/connector/stomp/ main/activemq/core/
test/activemq/connector/stomp/ test/activemq/core/
Author: tabish
Date: Wed Feb 21 12:20:50 2007
New Revision: 510183
URL: http://svn.apache.org/viewvc?view=rev&rev=510183
Log:
http://issues.apache.org/activemq/browse/AMQCPP-30
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerMessageListener.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/stomp/StompSessionManager.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.h
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerMessageListener.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerMessageListener.h?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerMessageListener.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/ConsumerMessageListener.h Wed Feb 21 12:20:50 2007
@@ -29,24 +29,21 @@
*/
class ConsumerMessageListener{
public:
-
+
virtual ~ConsumerMessageListener(){}
-
+
/**
* Called to dispatch a message to a particular consumer.
* @param consumer the target consumer of the dispatch.
- * @param msg the message to be dispatched.
- * @param own If true, it is the responsibility of the callee
- * to destroy the message object. Otherwise, the callee must NOT
+ * @param msg the message to be dispatched. the receiver owns this
* destroy it.
*/
- virtual void onConsumerMessage(
+ virtual void onConsumerMessage(
ConsumerInfo* consumer,
- core::ActiveMQMessage* msg,
- bool own = true ) = 0;
-
+ core::ActiveMQMessage* msg ) = 0;
+
};
-
+
}}
#endif /*_ACTIVEMQ_CONNECTOR_CONSUMERMESSAGELISTENER_H_*/
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/OpenWireConnector.cpp Wed Feb 21 12:20:50 2007
@@ -1211,10 +1211,7 @@
// Callback the listener (the connection object).
if( messageListener != NULL ){
- messageListener->onConsumerMessage(
- info,
- message,
- true );
+ messageListener->onConsumerMessage( info, message );
// Clear the Message as we've passed it onto the
// listener, who is responsible for deleting it at
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=510183&r1=510182&r2=510183
==============================================================================
--- 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 Wed Feb 21 12:20:50 2007
@@ -315,7 +315,7 @@
{
ActiveMQMessage* msg =
dynamic_cast< ActiveMQMessage* >( message );
- messageListener->onConsumerMessage( consumerInfo, msg, true );
+ messageListener->onConsumerMessage( consumerInfo, msg );
}
return;
@@ -336,7 +336,7 @@
{
ActiveMQMessage* msg =
dynamic_cast< ActiveMQMessage* >( message->clone() );
- messageListener->onConsumerMessage( consumerInfo, msg, true );
+ messageListener->onConsumerMessage( consumerInfo, msg );
}
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.cpp Wed Feb 21 12:20:50 2007
@@ -178,8 +178,7 @@
////////////////////////////////////////////////////////////////////////////////
void ActiveMQConnection::onConsumerMessage( connector::ConsumerInfo* consumer,
- core::ActiveMQMessage* message,
- bool own )
+ core::ActiveMQMessage* message )
{
try
{
@@ -207,9 +206,7 @@
Connector::DeliveredAck );
// Delete the message here
- if( own ){
- delete message;
- }
+ delete message;
return;
}
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.h?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnection.h Wed Feb 21 12:20:50 2007
@@ -199,11 +199,10 @@
* @param own If true, it is the responsibility of the callee
* to destroy the message object. Otherwise, the callee must NOT
* destroy it.
- *
+ *
*/
virtual void onConsumerMessage( connector::ConsumerInfo* consumer,
- core::ActiveMQMessage* message,
- bool own );
+ core::ActiveMQMessage* message );
private:
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompConnectorTest.h Wed Feb 21 12:20:50 2007
@@ -91,13 +91,10 @@
virtual ~MyMessageListener(){}
virtual void onConsumerMessage( ConsumerInfo* consumer,
- core::ActiveMQMessage* msg,
- bool own )
+ core::ActiveMQMessage* msg )
{
consumers.push_back( consumer );
-
- if( own )
- delete msg;
+ delete msg;
}
};
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/connector/stomp/StompSessionManagerTest.h Wed Feb 21 12:20:50 2007
@@ -97,13 +97,10 @@
virtual ~MyMessageListener(){}
virtual void onConsumerMessage( ConsumerInfo* consumer,
- core::ActiveMQMessage* msg,
- bool own )
+ core::ActiveMQMessage* msg )
{
consumers.push_back( consumer );
-
- if( own )
- delete msg;
+ delete msg;
}
};
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h?view=diff&rev=510183&r1=510182&r2=510183
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/core/ActiveMQConnectionTest.h Wed Feb 21 12:20:50 2007
@@ -89,8 +89,7 @@
virtual void onConsumerMessage(
connector::ConsumerInfo* consumer,
- core::ActiveMQMessage* msg AMQCPP_UNUSED,
- bool own )
+ core::ActiveMQMessage* msg AMQCPP_UNUSED )
{
consumers.push_back( consumer );
}