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/06/22 00:54:55 UTC
svn commit: r956724 [1/2] -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/
Author: tabish
Date: Mon Jun 21 22:54:55 2010
New Revision: 956724
URL: http://svn.apache.org/viewvc?rev=956724&view=rev
Log:
Remove the exception specifiers from all the methods in activemq.core.*
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQAckHandler.h
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/main/activemq/core/ActiveMQConnectionMetaData.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/Dispatcher.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/MessageDispatchChannel.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/Synchronization.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQAckHandler.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQAckHandler.h?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQAckHandler.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQAckHandler.h Mon Jun 21 22:54:55 2010
@@ -38,12 +38,15 @@ namespace core{
virtual ~ActiveMQAckHandler() {};
/**
- * Method called to acknowledge the message passed
- * @param message Message to Acknowledge
- * @throw CMSException
+ * Method called to acknowledge the message once it has been received by a
+ * MessageConsumer.
+ *
+ * @param message
+ * The Message to Acknowledge.
+ *
+ * @throw CMSException if an error occurs while acknowledging the given Message.
*/
- virtual void acknowledgeMessage( const commands::Message* message )
- throw ( cms::CMSException ) = 0;
+ virtual void acknowledgeMessage( const commands::Message* message ) = 0;
};
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?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- 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 Mon Jun 21 22:54:55 2010
@@ -186,8 +186,7 @@ ActiveMQConnection::~ActiveMQConnection(
////////////////////////////////////////////////////////////////////////////////
void ActiveMQConnection::addDispatcher(
- const decaf::lang::Pointer<ConsumerId>& consumer, Dispatcher* dispatcher )
- throw ( cms::CMSException ) {
+ const decaf::lang::Pointer<ConsumerId>& consumer, Dispatcher* dispatcher ) {
try{
// Add the consumer to the map.
@@ -199,9 +198,7 @@ void ActiveMQConnection::addDispatcher(
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::removeDispatcher(
- const decaf::lang::Pointer<ConsumerId>& consumer )
- throw ( cms::CMSException ) {
+void ActiveMQConnection::removeDispatcher( const decaf::lang::Pointer<ConsumerId>& consumer ) {
try{
// Remove the consumer from the map.
@@ -213,7 +210,7 @@ void ActiveMQConnection::removeDispatche
}
////////////////////////////////////////////////////////////////////////////////
-cms::Session* ActiveMQConnection::createSession() throw ( cms::CMSException ) {
+cms::Session* ActiveMQConnection::createSession() {
try {
return createSession( Session::AUTO_ACKNOWLEDGE );
}
@@ -221,8 +218,7 @@ cms::Session* ActiveMQConnection::create
}
////////////////////////////////////////////////////////////////////////////////
-cms::Session* ActiveMQConnection::createSession(
- cms::Session::AcknowledgeMode ackMode ) throw ( cms::CMSException ) {
+cms::Session* ActiveMQConnection::createSession( cms::Session::AcknowledgeMode ackMode ) {
try {
@@ -260,8 +256,7 @@ cms::Session* ActiveMQConnection::create
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::removeSession( ActiveMQSession* session )
- throw ( cms::CMSException ) {
+void ActiveMQConnection::removeSession( ActiveMQSession* session ) {
try {
@@ -274,8 +269,7 @@ void ActiveMQConnection::removeSession(
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::addProducer( ActiveMQProducer* producer )
- throw ( cms::CMSException ) {
+void ActiveMQConnection::addProducer( ActiveMQProducer* producer ) {
try {
@@ -288,8 +282,7 @@ void ActiveMQConnection::addProducer( Ac
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::removeProducer( const decaf::lang::Pointer<ProducerId>& producerId )
- throw ( cms::CMSException ) {
+void ActiveMQConnection::removeProducer( const decaf::lang::Pointer<ProducerId>& producerId ) {
try {
@@ -342,8 +335,8 @@ void ActiveMQConnection::setDefaultClien
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::close() throw ( cms::CMSException )
-{
+void ActiveMQConnection::close() {
+
try {
if( this->isClosed() ) {
@@ -392,7 +385,8 @@ void ActiveMQConnection::close() throw (
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::start() throw ( cms::CMSException ) {
+void ActiveMQConnection::start() {
+
try{
checkClosed();
@@ -414,7 +408,7 @@ void ActiveMQConnection::start() throw (
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::stop() throw ( cms::CMSException ) {
+void ActiveMQConnection::stop() {
try {
@@ -434,8 +428,7 @@ void ActiveMQConnection::stop() throw (
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::disconnect( long long lastDeliveredSequenceId )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQConnection::disconnect( long long lastDeliveredSequenceId ) {
try{
@@ -490,8 +483,7 @@ void ActiveMQConnection::disconnect( lon
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::sendPullRequest(
- const ConsumerInfo* consumer, long long timeout ) throw ( ActiveMQException ) {
+void ActiveMQConnection::sendPullRequest( const ConsumerInfo* consumer, long long timeout ) {
try {
@@ -511,11 +503,7 @@ void ActiveMQConnection::sendPullRequest
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::destroyDestination( const ActiveMQDestination* destination )
- throw( decaf::lang::exceptions::NullPointerException,
- decaf::lang::exceptions::IllegalStateException,
- decaf::lang::exceptions::UnsupportedOperationException,
- activemq::exceptions::ActiveMQException ) {
+void ActiveMQConnection::destroyDestination( const ActiveMQDestination* destination ) {
try{
@@ -544,11 +532,7 @@ void ActiveMQConnection::destroyDestinat
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::destroyDestination( const cms::Destination* destination )
- throw( decaf::lang::exceptions::NullPointerException,
- decaf::lang::exceptions::IllegalStateException,
- decaf::lang::exceptions::UnsupportedOperationException,
- activemq::exceptions::ActiveMQException ) {
+void ActiveMQConnection::destroyDestination( const cms::Destination* destination ) {
try{
@@ -730,8 +714,7 @@ void ActiveMQConnection::transportResume
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::oneway( Pointer<Command> command )
- throw ( ActiveMQException ) {
+void ActiveMQConnection::oneway( Pointer<Command> command ) {
try {
checkClosed();
@@ -744,8 +727,7 @@ void ActiveMQConnection::oneway( Pointer
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::syncRequest( Pointer<Command> command, unsigned int timeout )
- throw ( ActiveMQException ) {
+void ActiveMQConnection::syncRequest( Pointer<Command> command, unsigned int timeout ) {
try {
@@ -779,7 +761,7 @@ void ActiveMQConnection::syncRequest( Po
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::checkClosed() const throw ( ActiveMQException ) {
+void ActiveMQConnection::checkClosed() const {
if( this->isClosed() ) {
throw ActiveMQException(
__FILE__, __LINE__,
@@ -831,20 +813,14 @@ void ActiveMQConnection::fire( const Act
}
////////////////////////////////////////////////////////////////////////////////
-const ConnectionInfo& ActiveMQConnection::getConnectionInfo() const
- throw( ActiveMQException ) {
-
+const ConnectionInfo& ActiveMQConnection::getConnectionInfo() const {
checkClosed();
-
return *this->config->connectionInfo;
}
////////////////////////////////////////////////////////////////////////////////
-const ConnectionId& ActiveMQConnection::getConnectionId() const
- throw( ActiveMQException ) {
-
+const ConnectionId& ActiveMQConnection::getConnectionId() const {
checkClosed();
-
return *( this->config->connectionInfo->getConnectionId() );
}
@@ -875,8 +851,7 @@ void ActiveMQConnection::removeTransport
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::waitForTransportInterruptionProcessingToComplete()
- throw( decaf::lang::exceptions::InterruptedException ) {
+void ActiveMQConnection::waitForTransportInterruptionProcessingToComplete() {
Pointer<CountDownLatch> cdl = this->config->transportInterruptionProcessingComplete;
if( cdl != NULL ) {
@@ -909,8 +884,7 @@ void ActiveMQConnection::setTransportInt
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConnection::signalInterruptionProcessingComplete()
- throw( decaf::lang::exceptions::InterruptedException ) {
+void ActiveMQConnection::signalInterruptionProcessingComplete() {
Pointer<CountDownLatch> cdl = this->config->transportInterruptionProcessingComplete;
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?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- 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 Mon Jun 21 22:54:55 2010
@@ -140,40 +140,46 @@ namespace core{
virtual ~ActiveMQConnection() throw();
/**
- * Removes the session resources for the given session
- * instance.
- * @param session The session to be unregistered from this connection.
+ * Removes the session resources for the given session instance.
+ *
+ * @param session
+ * The session to be unregistered from this connection.
+ *
+ * @throws CMSException if an error occurs while removing performing the operation.
*/
- virtual void removeSession( ActiveMQSession* session ) throw ( cms::CMSException );
+ virtual void removeSession( ActiveMQSession* session );
/**
* Adds an active Producer to the Set of known producers.
- * @param producer - The Producer to add from the the known set.
+ *
+ * @param producer
+ * The Producer to add from the the known set.
+ *
+ * @throws CMSException if an error occurs while removing performing the operation.
*/
- virtual void addProducer( ActiveMQProducer* producer ) throw ( cms::CMSException );
+ virtual void addProducer( ActiveMQProducer* producer );
/**
* Removes an active Producer to the Set of known producers.
* @param producerId - The ProducerId to remove from the the known set.
+ * @throws CMSException if an error occurs while removing performing the operation.
*/
- virtual void removeProducer( const Pointer<commands::ProducerId>& producerId )
- throw ( cms::CMSException );
+ virtual void removeProducer( const Pointer<commands::ProducerId>& producerId );
/**
* Adds a dispatcher for a consumer.
* @param consumer - The consumer for which to register a dispatcher.
* @param dispatcher - The dispatcher to handle incoming messages for the consumer.
+ * @throws CMSException if an error occurs while removing performing the operation.
*/
- virtual void addDispatcher(
- const Pointer<commands::ConsumerId>& consumer, Dispatcher* dispatcher )
- throw ( cms::CMSException );
+ virtual void addDispatcher( const Pointer<commands::ConsumerId>& consumer, Dispatcher* dispatcher );
/**
* Removes the dispatcher for a consumer.
* @param consumer - The consumer for which to remove the dispatcher.
+ * @throws CMSException if an error occurs while removing performing the operation.
*/
- virtual void removeDispatcher( const Pointer<commands::ConsumerId>& consumer )
- throw ( cms::CMSException );
+ virtual void removeDispatcher( const Pointer<commands::ConsumerId>& consumer );
/**
* If supported sends a message pull request to the service provider asking
@@ -182,9 +188,10 @@ namespace core{
* capable of delivering messages on a pull basis.
* @param consumer - the ConsumerInfo for the requesting Consumer.
* @param timeout - the time that the client is willing to wait.
+ *
+ * @throws ActiveMQException if an error occurs while removing performing the operation.
*/
- virtual void sendPullRequest( const commands::ConsumerInfo* consumer, long long timeout )
- throw ( exceptions::ActiveMQException );
+ virtual void sendPullRequest( const commands::ConsumerInfo* consumer, long long timeout );
/**
* Checks if this connection has been closed
@@ -228,11 +235,7 @@ namespace core{
* @throws ActiveMQException
* If any other error occurs during the attempt to destroy the destination.
*/
- virtual void destroyDestination( const commands::ActiveMQDestination* destination )
- throw( decaf::lang::exceptions::NullPointerException,
- decaf::lang::exceptions::IllegalStateException,
- decaf::lang::exceptions::UnsupportedOperationException,
- activemq::exceptions::ActiveMQException );
+ virtual void destroyDestination( const commands::ActiveMQDestination* destination );
/**
* Requests that the Broker removes the given Destination. Calling this
@@ -252,34 +255,21 @@ namespace core{
* @throws ActiveMQException
* If any other error occurs during the attempt to destroy the destination.
*/
- virtual void destroyDestination( const cms::Destination* destination )
- throw( decaf::lang::exceptions::NullPointerException,
- decaf::lang::exceptions::IllegalStateException,
- decaf::lang::exceptions::UnsupportedOperationException,
- activemq::exceptions::ActiveMQException );
+ virtual void destroyDestination( const cms::Destination* destination );
public: // Connection Interface Methods
/**
- * Gets the metadata for this connection.
- *
- * @returns the connection MetaData pointer ( caller does not own it ).
- *
- * @throws CMSException
- * if the provider fails to get the connection metadata for this connection.
- *
- * @see ConnectionMetaData
- * @since 2.0
+ * {@inheritDoc}
*/
- virtual const cms::ConnectionMetaData* getMetaData() const throw( cms::CMSException ) {
+ virtual const cms::ConnectionMetaData* getMetaData() const {
return connectionMetaData.get();
}
/**
- * Creates a new Session to work for this Connection
- * @throws CMSException
+ * {@inheritDoc}
*/
- virtual cms::Session* createSession() throw ( cms::CMSException );
+ virtual cms::Session* createSession();
/**
* {@inheritDoc}
@@ -292,43 +282,32 @@ namespace core{
virtual void setClientID( const std::string& clientID );
/**
- * Creates a new Session to work for this Connection using the
- * specified acknowledgment mode
- * @param ackMode the Acknowledgment Mode to use.
- * @throws CMSException
+ * {@inheritDoc}
*/
- virtual cms::Session* createSession( cms::Session::AcknowledgeMode ackMode )
- throw ( cms::CMSException );
+ virtual cms::Session* createSession( cms::Session::AcknowledgeMode ackMode );
/**
- * Closes this connection as well as any Sessions
- * created from it (and those Sessions' consumers and
- * producers).
- * @throws CMSException
+ * {@inheritDoc}
*/
- virtual void close() throw ( cms::CMSException );
+ virtual void close();
/**
- * Starts or (restarts) a connections delivery of incoming messages
- * @throws CMSException
+ * {@inheritDoc}
*/
- virtual void start() throw ( cms::CMSException );
+ virtual void start();
/**
- * Stop the flow of incoming messages
- * @throws CMSException
+ * {@inheritDoc}
*/
- virtual void stop() throw ( cms::CMSException );
+ virtual void stop();
/**
- * Gets the registered Exception Listener for this connection
- * @return pointer to an exception listener or NULL
+ * {@inheritDoc}
*/
virtual cms::ExceptionListener* getExceptionListener() const;
/**
- * Sets the registered Exception Listener for this connection
- * @param listener pointer to and <code>ExceptionListener</code>
+ * {@inheritDoc}
*/
virtual void setExceptionListener( cms::ExceptionListener* listener );
@@ -581,17 +560,19 @@ namespace core{
/**
* Gets the ConnectionInfo for this Object, if the Connection is not open
- * than this method throws an exception
+ * than this method throws an exception.
+ *
+ * @throws ActiveMQException if an error occurs while performing this operation.
*/
- const commands::ConnectionInfo& getConnectionInfo() const
- throw( exceptions::ActiveMQException );
+ const commands::ConnectionInfo& getConnectionInfo() const;
/**
* Gets the ConnectionId for this Object, if the Connection is not open
- * than this method throws an exception
+ * than this method throws an exception.
+ *
+ * @throws ActiveMQException if an error occurs while performing this operation.
*/
- const commands::ConnectionId& getConnectionId() const
- throw( exceptions::ActiveMQException );
+ const commands::ConnectionId& getConnectionId() const;
/**
* Gets a reference to this object's Transport instance.
@@ -606,8 +587,7 @@ namespace core{
* @throws ConnectorException if not currently connected, or
* if the operation fails for any reason.
*/
- void oneway( Pointer<commands::Command> command )
- throw ( activemq::exceptions::ActiveMQException );
+ void oneway( Pointer<commands::Command> command );
/**
* Sends a synchronous request and returns the response from the broker.
@@ -617,8 +597,7 @@ namespace core{
* @throws ConnectorException thrown if an error response was received
* from the broker, or if any other error occurred.
*/
- void syncRequest( Pointer<commands::Command> command, unsigned int timeout = 0 )
- throw ( activemq::exceptions::ActiveMQException );
+ void syncRequest( Pointer<commands::Command> command, unsigned int timeout = 0 );
/**
* Notify the exception listener
@@ -635,21 +614,19 @@ namespace core{
private:
// Sends a oneway disconnect message to the broker.
- void disconnect( long long lastDeliveredSequenceId ) throw ( activemq::exceptions::ActiveMQException );
+ void disconnect( long long lastDeliveredSequenceId );
// Check for Closed State and Throw an exception if true.
- void checkClosed() const throw ( activemq::exceptions::ActiveMQException );
+ void checkClosed() const;
// If its not been sent, then send the ConnectionInfo to the Broker.
void ensureConnectionInfoSent();
// Waits for all Consumers to handle the Transport Interrupted event.
- void waitForTransportInterruptionProcessingToComplete()
- throw ( decaf::lang::exceptions::InterruptedException );
+ void waitForTransportInterruptionProcessingToComplete();
// Marks processing complete for a single caller when interruption processing completes.
- void signalInterruptionProcessingComplete()
- throw ( decaf::lang::exceptions::InterruptedException );
+ void signalInterruptionProcessingComplete();
};
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.cpp?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.cpp Mon Jun 21 22:54:55 2010
@@ -30,43 +30,42 @@ ActiveMQConnectionMetaData::~ActiveMQCon
}
////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQConnectionMetaData::getCMSVersion() const throw( cms::CMSException ) {
+std::string ActiveMQConnectionMetaData::getCMSVersion() const {
return "2.3";
}
////////////////////////////////////////////////////////////////////////////////
-int ActiveMQConnectionMetaData::getCMSMajorVersion() const throw( cms::CMSException ) {
+int ActiveMQConnectionMetaData::getCMSMajorVersion() const {
return 2;
}
////////////////////////////////////////////////////////////////////////////////
-int ActiveMQConnectionMetaData::getCMSMinorVersion() const throw( cms::CMSException ) {
+int ActiveMQConnectionMetaData::getCMSMinorVersion() const {
return 3;
}
////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQConnectionMetaData::getCMSProviderName() const throw( cms::CMSException ) {
+std::string ActiveMQConnectionMetaData::getCMSProviderName() const {
return "activemq-cpp";
}
////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQConnectionMetaData::getProviderVersion() const throw( cms::CMSException ) {
+std::string ActiveMQConnectionMetaData::getProviderVersion() const {
return "3.3.0";
}
////////////////////////////////////////////////////////////////////////////////
-int ActiveMQConnectionMetaData::getProviderMajorVersion() const throw( cms::CMSException ) {
+int ActiveMQConnectionMetaData::getProviderMajorVersion() const {
return 3;
}
////////////////////////////////////////////////////////////////////////////////
-int ActiveMQConnectionMetaData::getProviderMinorVersion() const throw( cms::CMSException ) {
+int ActiveMQConnectionMetaData::getProviderMinorVersion() const {
return 3;
}
////////////////////////////////////////////////////////////////////////////////
-std::vector<std::string> ActiveMQConnectionMetaData::getCMSXPropertyNames() const
- throw( cms::CMSException ) {
+std::vector<std::string> ActiveMQConnectionMetaData::getCMSXPropertyNames() const {
std::vector<std::string> jmxProperties;
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.h?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConnectionMetaData.h Mon Jun 21 22:54:55 2010
@@ -44,85 +44,21 @@ namespace core {
public: // cms::ConnectionMetaData
- /**
- * Gets the CMS API version.
- *
- * @return the CMS API Version in String form.
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual std::string getCMSVersion() const throw( cms::CMSException );
-
- /**
- * Gets the CMS major version number.
- *
- * @returns the CMS API major version number
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual int getCMSMajorVersion() const throw( cms::CMSException );
-
- /**
- * Gets the CMS minor version number.
- *
- * @returns the CMS API minor version number
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual int getCMSMinorVersion() const throw( cms::CMSException );
-
- /**
- * Gets the CMS provider name.
- *
- * @returns the CMS provider name
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual std::string getCMSProviderName() const throw( cms::CMSException );
-
- /**
- * Gets the CMS provider version.
- *
- * @returns the CMS provider version
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual std::string getProviderVersion() const throw( cms::CMSException );
-
- /**
- * Gets the CMS provider major version number.
- *
- * @returns the CMS provider major version number
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual int getProviderMajorVersion() const throw( cms::CMSException );
-
- /**
- * Gets the CMS provider minor version number.
- *
- * @returns the CMS provider minor version number
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual int getProviderMinorVersion() const throw( cms::CMSException );
-
- /**
- * Gets an Vector of the CMSX property names.
- *
- * @returns an Vector of CMSX property names
- *
- * @throw CMSException
- * If the CMS Provider fails to retrieve the metadata due to some internal error.
- */
- virtual std::vector<std::string> getCMSXPropertyNames() const throw( cms::CMSException );
+ virtual std::string getCMSVersion() const;
+
+ virtual int getCMSMajorVersion() const;
+
+ virtual int getCMSMinorVersion() const;
+
+ virtual std::string getCMSProviderName() const;
+
+ virtual std::string getProviderVersion() const;
+
+ virtual int getProviderMajorVersion() const;
+
+ virtual int getProviderMinorVersion() const;
+
+ virtual std::vector<std::string> getCMSXPropertyNames() const;
};
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.cpp Mon Jun 21 22:54:55 2010
@@ -81,17 +81,17 @@ namespace core {
virtual ~TransactionSynhcronization() {}
- virtual void beforeEnd() throw( exceptions::ActiveMQException ) {
+ virtual void beforeEnd() {
consumer->acknowledge();
consumer->setSynchronizationRegistered( false );
}
- virtual void afterCommit() throw( exceptions::ActiveMQException ) {
+ virtual void afterCommit() {
consumer->commit();
consumer->setSynchronizationRegistered( false );
}
- virtual void afterRollback() throw( exceptions::ActiveMQException ) {
+ virtual void afterRollback() {
consumer->rollback();
consumer->setSynchronizationRegistered( false );
}
@@ -122,14 +122,14 @@ namespace core {
virtual ~CloseSynhcronization() {}
- virtual void beforeEnd() throw( exceptions::ActiveMQException ) {
+ virtual void beforeEnd() {
}
- virtual void afterCommit() throw( exceptions::ActiveMQException ) {
+ virtual void afterCommit() {
consumer->doClose();
}
- virtual void afterRollback() throw( exceptions::ActiveMQException ) {
+ virtual void afterRollback() {
consumer->doClose();
}
@@ -149,8 +149,7 @@ namespace core {
this->session = session;
}
- void acknowledgeMessage( const commands::Message* message AMQCPP_UNUSED )
- throw ( cms::CMSException ) {
+ void acknowledgeMessage( const commands::Message* message AMQCPP_UNUSED ) {
try {
this->session->acknowledge();
@@ -175,8 +174,7 @@ namespace core {
this->dispatch = dispatch;
}
- void acknowledgeMessage( const commands::Message* message AMQCPP_UNUSED )
- throw ( cms::CMSException ) {
+ void acknowledgeMessage( const commands::Message* message AMQCPP_UNUSED ) {
try {
@@ -281,8 +279,7 @@ void ActiveMQConsumer::stop() {
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::close()
- throw ( cms::CMSException ) {
+void ActiveMQConsumer::close() {
try{
if( !this->isClosed() ) {
@@ -312,7 +309,7 @@ void ActiveMQConsumer::close()
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::doClose() throw ( ActiveMQException ) {
+void ActiveMQConsumer::doClose() {
try {
@@ -379,8 +376,7 @@ void ActiveMQConsumer::doClose() throw (
}
////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQConsumer::getMessageSelector() const
- throw ( cms::CMSException ) {
+std::string ActiveMQConsumer::getMessageSelector() const {
try {
// Fetch the Selector
@@ -390,8 +386,7 @@ std::string ActiveMQConsumer::getMessage
}
////////////////////////////////////////////////////////////////////////////////
-decaf::lang::Pointer<MessageDispatch> ActiveMQConsumer::dequeue( long long timeout )
- throw ( cms::CMSException ) {
+decaf::lang::Pointer<MessageDispatch> ActiveMQConsumer::dequeue( long long timeout ) {
try {
@@ -440,7 +435,7 @@ decaf::lang::Pointer<MessageDispatch> Ac
}
////////////////////////////////////////////////////////////////////////////////
-cms::Message* ActiveMQConsumer::receive() throw ( cms::CMSException ) {
+cms::Message* ActiveMQConsumer::receive() {
try{
@@ -473,8 +468,7 @@ cms::Message* ActiveMQConsumer::receive(
}
////////////////////////////////////////////////////////////////////////////////
-cms::Message* ActiveMQConsumer::receive( int millisecs )
- throw ( cms::CMSException ) {
+cms::Message* ActiveMQConsumer::receive( int millisecs ) {
try {
@@ -507,8 +501,7 @@ cms::Message* ActiveMQConsumer::receive(
}
////////////////////////////////////////////////////////////////////////////////
-cms::Message* ActiveMQConsumer::receiveNoWait()
- throw ( cms::CMSException ) {
+cms::Message* ActiveMQConsumer::receiveNoWait() {
try {
@@ -541,7 +534,7 @@ cms::Message* ActiveMQConsumer::receiveN
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::setMessageListener( cms::MessageListener* listener ) throw ( cms::CMSException ) {
+void ActiveMQConsumer::setMessageListener( cms::MessageListener* listener ) {
try{
@@ -676,8 +669,7 @@ void ActiveMQConsumer::afterMessageIsCon
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::deliverAcks()
- throw ( ActiveMQException ) {
+void ActiveMQConsumer::deliverAcks() {
try{
@@ -721,8 +713,7 @@ void ActiveMQConsumer::deliverAcks()
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::ackLater( const Pointer<MessageDispatch>& dispatch, int ackType )
- throw ( ActiveMQException ) {
+void ActiveMQConsumer::ackLater( const Pointer<MessageDispatch>& dispatch, int ackType ) {
// Don't acknowledge now, but we may need to let the broker know the
// consumer got the message to expand the pre-fetch window
@@ -797,8 +788,7 @@ Pointer<MessageAck> ActiveMQConsumer::ma
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::acknowledge( const Pointer<commands::MessageDispatch>& dispatch )
- throw ( cms::CMSException ) {
+void ActiveMQConsumer::acknowledge( const Pointer<commands::MessageDispatch>& dispatch ) {
try{
@@ -836,7 +826,7 @@ void ActiveMQConsumer::acknowledge( cons
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::acknowledge() throw ( cms::CMSException ) {
+void ActiveMQConsumer::acknowledge() {
try{
@@ -871,7 +861,7 @@ void ActiveMQConsumer::acknowledge() thr
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::commit() throw( ActiveMQException ) {
+void ActiveMQConsumer::commit() {
synchronized( &dispatchedMessages ) {
dispatchedMessages.clear();
@@ -880,7 +870,7 @@ void ActiveMQConsumer::commit() throw( A
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::rollback() throw( ActiveMQException ) {
+void ActiveMQConsumer::rollback() {
synchronized( &unconsumedMessages ) {
@@ -1033,8 +1023,7 @@ void ActiveMQConsumer::dispatch( const P
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::sendPullRequest( long long timeout )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQConsumer::sendPullRequest( long long timeout ) {
try {
@@ -1061,7 +1050,7 @@ void ActiveMQConsumer::sendPullRequest(
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQConsumer::checkClosed() const throw( ActiveMQException ) {
+void ActiveMQConsumer::checkClosed() const {
if( this->isClosed() ) {
throw ActiveMQException(
__FILE__, __LINE__,
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQConsumer.h Mon Jun 21 22:54:55 2010
@@ -162,116 +162,61 @@ namespace core{
public: // Interface Implementation
- /**
- * Starts the Consumer if not already started and not closed. A consumer
- * will no deliver messages until started.
- */
virtual void start();
- /**
- * Stops a Consumer, the Consumer will not deliver any messages that are
- * dispatched to it until it is started again. A Closed Consumer is also a
- * stopped consumer.
- */
virtual void stop();
- /**
- * Closes the Consumer. This will return all allocated resources
- * and purge any outstanding messages. This method will block if
- * there is a call to receive in progress, or a dispatch to a
- * MessageListener in place
- * @throws CMSException
- */
- virtual void close() throw ( cms::CMSException );
+ virtual void close();
- /**
- * Synchronously Receive a Message
- * @return new message
- * @throws CMSException
- */
- virtual cms::Message* receive() throw ( cms::CMSException );
+ virtual cms::Message* receive();
- /**
- * Synchronously Receive a Message, time out after defined interval.
- * Returns null if nothing read.
- * @param millisecs the time in milliseconds to wait before returning
- * @return new message or null on timeout
- * @throws CMSException
- */
- virtual cms::Message* receive( int millisecs ) throw ( cms::CMSException );
+ virtual cms::Message* receive( int millisecs );
- /**
- * Receive a Message, does not wait if there isn't a new message
- * to read, returns NULL if nothing read.
- * @return new message
- * @throws CMSException
- */
- virtual cms::Message* receiveNoWait() throw ( cms::CMSException );
+ virtual cms::Message* receiveNoWait();
- /**
- * Sets the MessageListener that this class will send notifs on
- * @param listener MessageListener interface pointer
- */
- virtual void setMessageListener( cms::MessageListener* listener ) throw ( cms::CMSException );
+ virtual void setMessageListener( cms::MessageListener* listener );
- /**
- * Gets the MessageListener that this class will send events to.
- * @return the currently registered MessageListener interface pointer.
- */
- virtual cms::MessageListener* getMessageListener() const throw ( cms::CMSException ) {
+ virtual cms::MessageListener* getMessageListener() const {
return this->listener;
}
- /**
- * Gets this message consumer's message selector expression.
- * @return This Consumer's selector expression or "".
- * @throws cms::CMSException
- */
- virtual std::string getMessageSelector() const
- throw ( cms::CMSException );
+ virtual std::string getMessageSelector() const;
- /**
- * Method called to acknowledge the message passed, called from a message
- * when the mode is client ack.
- * @param message the Message to Acknowledge
- * @throw CMSException
- */
- virtual void acknowledge( const Pointer<commands::MessageDispatch>& dispatch )
- throw ( cms::CMSException );
+ virtual void acknowledge( const Pointer<commands::MessageDispatch>& dispatch );
public: // Dispatcher Methods
- /**
- * Called asynchronously by the session to dispatch a message.
- * @param message dispatch object pointer
- */
virtual void dispatch( const Pointer<MessageDispatch>& message );
public: // ActiveMQConsumer Methods
/**
* Method called to acknowledge all messages that have been received so far.
- * @throw CMSException
+ *
+ * @throw CMSException if an error occurs while ack'ing the message.
*/
- void acknowledge() throw ( cms::CMSException );
+ void acknowledge();
/**
* Called to Commit the current set of messages in this Transaction
- * @throw ActiveMQException
+ *
+ * @throw ActiveMQException if an error occurs while performing the operation.
*/
- void commit() throw ( exceptions::ActiveMQException );
+ void commit();
/**
* Called to Roll back the current set of messages in this Transaction
- * @throw ActiveMQException
+ *
+ * @throw ActiveMQException if an error occurs while performing the operation.
*/
- void rollback() throw ( exceptions::ActiveMQException );
+ void rollback();
/**
* Performs the actual close operation on this consumer
- * @throw ActiveMQException
+ *
+ * @throw ActiveMQException if an error occurs while performing the operation.
*/
- void doClose() throw ( exceptions::ActiveMQException );
+ void doClose();
/**
* Get the Consumer information for this consumer
@@ -323,8 +268,10 @@ namespace core{
/**
* Forces this consumer to send all pending acks to the broker.
+ *
+ * @throw ActiveMQException if an error occurs while performing the operation.
*/
- void deliverAcks() throw ( exceptions::ActiveMQException );
+ void deliverAcks();
/**
* Called on a Failover to clear any pending messages.
@@ -392,17 +339,18 @@ namespace core{
* Used by synchronous receive methods to wait for messages to come in.
* @param timeout - The maximum number of milliseconds to wait before
* returning.
+ *
* If -1, it will block until a messages is received or this consumer
* is closed.
* If 0, will not block at all. If > 0, will wait at a maximum the
* specified number of milliseconds before returning.
* @return the message, if received within the allotted time.
* Otherwise NULL.
+ *
* @throws InvalidStateException if this consumer is closed upon
- * entering this method.
+ * entering this method.
*/
- Pointer<MessageDispatch> dequeue( long long timeout )
- throw ( cms::CMSException );
+ Pointer<MessageDispatch> dequeue( long long timeout );
/**
* Pre-consume processing
@@ -431,17 +379,15 @@ namespace core{
// capable of delivering messages on a pull basis. No request is made if
// there are already messages in the unconsumed queue since there's no need
// for a server round-trip in that instance.
- void sendPullRequest( long long timeout )
- throw ( exceptions::ActiveMQException );
+ void sendPullRequest( long long timeout );
// Checks for the closed state and throws if so.
- void checkClosed() const throw( exceptions::ActiveMQException );
+ void checkClosed() const;
// Sends an ack as needed in order to keep them coming in if the current
// ack mode allows the consumer to receive up to the prefetch limit before
// an real ack is sent.
- void ackLater( const Pointer<commands::MessageDispatch>& message, int ackType )
- throw ( exceptions::ActiveMQException );
+ void ackLater( const Pointer<commands::MessageDispatch>& message, int ackType );
// Create an Ack Message that acks all messages that have been delivered so far.
Pointer<commands::MessageAck> makeAckForAllDeliveredMessages( int type );
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.cpp?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.cpp Mon Jun 21 22:54:55 2010
@@ -91,7 +91,7 @@ ActiveMQProducer::~ActiveMQProducer() th
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQProducer::close() throw ( cms::CMSException ) {
+void ActiveMQProducer::close() {
try{
@@ -112,10 +112,7 @@ void ActiveMQProducer::close() throw ( c
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQProducer::send( cms::Message* message ) throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException ) {
+void ActiveMQProducer::send( cms::Message* message ) {
try {
@@ -127,11 +124,7 @@ void ActiveMQProducer::send( cms::Messag
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQProducer::send( cms::Message* message, int deliveryMode, int priority, long long timeToLive )
- throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException ) {
+void ActiveMQProducer::send( cms::Message* message, int deliveryMode, int priority, long long timeToLive ) {
try {
@@ -143,11 +136,7 @@ void ActiveMQProducer::send( cms::Messag
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQProducer::send( const cms::Destination* destination, cms::Message* message )
- throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException ) {
+void ActiveMQProducer::send( const cms::Destination* destination, cms::Message* message ) {
try {
@@ -160,11 +149,7 @@ void ActiveMQProducer::send( const cms::
////////////////////////////////////////////////////////////////////////////////
void ActiveMQProducer::send( const cms::Destination* destination, cms::Message* message,
- int deliveryMode, int priority, long long timeToLive )
- throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException ) {
+ int deliveryMode, int priority, long long timeToLive ) {
try {
@@ -236,7 +221,7 @@ void ActiveMQProducer::onProducerAck( co
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQProducer::checkClosed() const throw( activemq::exceptions::ActiveMQException ) {
+void ActiveMQProducer::checkClosed() const {
if( closed ) {
throw ActiveMQException(
__FILE__, __LINE__,
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.h?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQProducer.h Mon Jun 21 22:54:55 2010
@@ -100,118 +100,24 @@ namespace core{
virtual ~ActiveMQProducer() throw();
- /**
- * Closes the Consumer. This will return all allocated resources
- * and purge any outstanding messages. This method will block if
- * there is a call to receive in progress, or a dispatch to a
- * MessageListener in place
- * @throws CMSException
- */
- virtual void close() throw ( cms::CMSException );
-
- /**
- * Sends the message to the default producer destination, but does
- * not take ownership of the message, caller must still destroy it.
- * Uses default values for deliveryMode, priority, and time to live.
- *
- * @param message
- * The message to be sent.
- *
- * @throws CMSException - if an internal error occurs while sending the message.
- * @throws MessageFormatException - if an Invalid Message is given.
- * @throws InvalidDestinationException - if a client uses this method with a
- * MessageProducer with an invalid destination.
- * @throws UnsupportedOperationException - if a client uses this method with a
- * MessageProducer that did not specify a destination at creation time.
- */
- virtual void send( cms::Message* message ) throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException );
-
- /**
- * Sends the message to the default producer destination, but does
- * not take ownership of the message, caller must still destroy it.
- *
- * @param message
- * The message to be sent.
- * @param deliveryMode
- * The delivery mode to be used.
- * @param priority
- * The priority for this message.
- * @param timeToLive
- * The time to live value for this message in milliseconds.
- *
- * @throws CMSException - if an internal error occurs while sending the message.
- * @throws MessageFormatException - if an Invalid Message is given.
- * @throws InvalidDestinationException - if a client uses this method with a
- * MessageProducer with an invalid destination.
- * @throws UnsupportedOperationException - if a client uses this method with a
- * MessageProducer that did not specify a destination at creation time.
- */
- virtual void send( cms::Message* message, int deliveryMode, int priority, long long timeToLive )
- throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException );
-
- /**
- * Sends the message to the designated destination, but does
- * not take ownership of the message, caller must still destroy it.
- * Uses default values for deliveryMode, priority, and time to live.
- *
- * @param destination
- * The destination on which to send the message
- * @param message
- * the message to be sent.
- *
- * @throws CMSException - if an internal error occurs while sending the message.
- * @throws MessageFormatException - if an Invalid Message is given.
- * @throws InvalidDestinationException - if a client uses this method with a
- * MessageProducer with an invalid destination.
- * @throws UnsupportedOperationException - if a client uses this method with a
- * MessageProducer that did not specify a destination at creation time.
- */
- virtual void send( const cms::Destination* destination, cms::Message* message )
- throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException );
-
- /**
- * Sends the message to the designated destination, but does
- * not take ownership of the message, caller must still destroy it.
- *
- * @param destination
- * The destination on which to send the message
- * @param message
- * The message to be sent.
- * @param deliveryMode
- * The delivery mode to be used.
- * @param priority
- * The priority for this message.
- * @param timeToLive
- * The time to live value for this message in milliseconds.
- *
- * @throws CMSException - if an internal error occurs while sending the message.
- * @throws MessageFormatException - if an Invalid Message is given.
- * @throws InvalidDestinationException - if a client uses this method with a
- * MessageProducer with an invalid destination.
- * @throws UnsupportedOperationException - if a client uses this method with a
- * MessageProducer that did not specify a destination at creation time.
- */
+ public: // cms::MessageProducer methods.
+
+ virtual void close();
+
+ virtual void send( cms::Message* message );
+
+ virtual void send( cms::Message* message, int deliveryMode, int priority, long long timeToLive );
+
+ virtual void send( const cms::Destination* destination, cms::Message* message );
+
virtual void send( const cms::Destination* destination, cms::Message* message,
- int deliveryMode, int priority, long long timeToLive )
- throw ( cms::CMSException,
- cms::MessageFormatException,
- cms::InvalidDestinationException,
- cms::UnsupportedOperationException );
+ int deliveryMode, int priority, long long timeToLive );
/**
* Sets the delivery mode for this Producer
* @param mode - The DeliveryMode to use for Message sends.
*/
- virtual void setDeliveryMode( int mode ) throw ( cms::CMSException ){
+ virtual void setDeliveryMode( int mode ) {
this->defaultDeliveryMode = mode;
}
@@ -219,7 +125,7 @@ namespace core{
* Gets the delivery mode for this Producer
* @return The DeliveryMode
*/
- virtual int getDeliveryMode() const throw ( cms::CMSException ) {
+ virtual int getDeliveryMode() const {
return this->defaultDeliveryMode;
}
@@ -227,7 +133,7 @@ namespace core{
* Sets if Message Ids are disabled for this Producer
* @param value - boolean indicating enable / disable (true / false)
*/
- virtual void setDisableMessageID( bool value ) throw ( cms::CMSException ) {
+ virtual void setDisableMessageID( bool value ) {
this->disableMessageId = value;
}
@@ -235,7 +141,7 @@ namespace core{
* Gets if Message Ids are disabled for this Producer
* @return a boolean indicating state enable / disable (true / false) for MessageIds.
*/
- virtual bool getDisableMessageID() const throw ( cms::CMSException ) {
+ virtual bool getDisableMessageID() const {
return this->disableMessageId;
}
@@ -243,7 +149,7 @@ namespace core{
* Sets if Message Time Stamps are disabled for this Producer
* @param value - boolean indicating enable / disable (true / false)
*/
- virtual void setDisableMessageTimeStamp( bool value ) throw ( cms::CMSException ) {
+ virtual void setDisableMessageTimeStamp( bool value ) {
this->disableTimestamps = value;
}
@@ -251,7 +157,7 @@ namespace core{
* Gets if Message Time Stamps are disabled for this Producer
* @returns boolean indicating state of enable / disable (true / false)
*/
- virtual bool getDisableMessageTimeStamp() const throw ( cms::CMSException ) {
+ virtual bool getDisableMessageTimeStamp() const {
return this->disableTimestamps;
}
@@ -259,7 +165,7 @@ namespace core{
* Sets the Priority that this Producers sends messages at
* @param priority int value for Priority level
*/
- virtual void setPriority( int priority ) throw ( cms::CMSException ) {
+ virtual void setPriority( int priority ) {
this->defaultPriority = priority;
}
@@ -267,7 +173,7 @@ namespace core{
* Gets the Priority level that this producer sends messages at
* @return int based priority level
*/
- virtual int getPriority() const throw ( cms::CMSException ) {
+ virtual int getPriority() const {
return this->defaultPriority;
}
@@ -275,7 +181,7 @@ namespace core{
* Sets the Time to Live that this Producers sends messages with
* @param time The new default time to live value in milliseconds.
*/
- virtual void setTimeToLive( long long time ) throw ( cms::CMSException ) {
+ virtual void setTimeToLive( long long time ) {
this->defaultTimeToLive = time;
}
@@ -283,7 +189,7 @@ namespace core{
* Gets the Time to Live that this producer sends messages with
* @return The default time to live value in milliseconds.
*/
- virtual long long getTimeToLive() const throw ( cms::CMSException ) {
+ virtual long long getTimeToLive() const {
return this->defaultTimeToLive;
}
@@ -291,7 +197,7 @@ namespace core{
* Sets the Send Timeout that this Producers sends messages with
* @param time The new default send timeout value in milliseconds.
*/
- virtual void setSendTimeout( long long time ) throw ( cms::CMSException ) {
+ virtual void setSendTimeout( long long time ) {
this->sendTimeout = time;
}
@@ -299,7 +205,7 @@ namespace core{
* Gets the Send Timeout that this producer sends messages with
* @return The default send timeout value in milliseconds.
*/
- virtual long long getSendTimeout() const throw ( cms::CMSException ) {
+ virtual long long getSendTimeout() const {
return this->sendTimeout;
}
@@ -339,7 +245,7 @@ namespace core{
private:
// Checks for the closed state and throws if so.
- void checkClosed() const throw( exceptions::ActiveMQException );
+ void checkClosed() const;
};
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.cpp Mon Jun 21 22:54:55 2010
@@ -126,17 +126,17 @@ ActiveMQQueueBrowser::~ActiveMQQueueBrow
}
////////////////////////////////////////////////////////////////////////////////
-const cms::Queue* ActiveMQQueueBrowser::getQueue() const throw ( cms::CMSException ) {
+const cms::Queue* ActiveMQQueueBrowser::getQueue() const {
return this->queue;
}
////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQQueueBrowser::getMessageSelector() const throw ( cms::CMSException ) {
+std::string ActiveMQQueueBrowser::getMessageSelector() const {
return this->selector;
}
////////////////////////////////////////////////////////////////////////////////
-cms::MessageEnumeration* ActiveMQQueueBrowser::getEnumeration() throw ( cms::CMSException ) {
+cms::MessageEnumeration* ActiveMQQueueBrowser::getEnumeration() {
try{
checkClosed();
@@ -149,7 +149,7 @@ cms::MessageEnumeration* ActiveMQQueueBr
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQQueueBrowser::close() throw( cms::CMSException ) {
+void ActiveMQQueueBrowser::close() {
try{
if( this->closed ) {
@@ -193,7 +193,7 @@ bool ActiveMQQueueBrowser::hasMoreMessag
}
////////////////////////////////////////////////////////////////////////////////
-cms::Message* ActiveMQQueueBrowser::nextMessage() throw( cms::CMSException ) {
+cms::Message* ActiveMQQueueBrowser::nextMessage() {
try{
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.h?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQQueueBrowser.h Mon Jun 21 22:54:55 2010
@@ -77,17 +77,17 @@ namespace core {
public:
- virtual const cms::Queue* getQueue() const throw ( cms::CMSException );
+ virtual const cms::Queue* getQueue() const;
- virtual std::string getMessageSelector() const throw ( cms::CMSException );
+ virtual std::string getMessageSelector() const;
- virtual cms::MessageEnumeration* getEnumeration() throw ( cms::CMSException );
+ virtual cms::MessageEnumeration* getEnumeration();
- virtual void close() throw( cms::CMSException );
+ virtual void close();
virtual bool hasMoreMessages();
- virtual cms::Message* nextMessage() throw( cms::CMSException );
+ virtual cms::Message* nextMessage();
private:
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp?rev=956724&r1=956723&r2=956724&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp Mon Jun 21 22:54:55 2010
@@ -111,8 +111,8 @@ void ActiveMQSession::fire( const active
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::close() throw ( cms::CMSException )
-{
+void ActiveMQSession::close() {
+
// If we're already closed, just return.
if( closed ) {
return;
@@ -173,7 +173,7 @@ void ActiveMQSession::close() throw ( cm
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::commit() throw ( cms::CMSException ) {
+void ActiveMQSession::commit() {
try {
@@ -192,7 +192,7 @@ void ActiveMQSession::commit() throw ( c
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::rollback() throw ( cms::CMSException ) {
+void ActiveMQSession::rollback() {
try{
@@ -211,7 +211,7 @@ void ActiveMQSession::rollback() throw (
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::recover() throw( cms::CMSException ) {
+void ActiveMQSession::recover() {
try{
@@ -268,9 +268,7 @@ void ActiveMQSession::deliverAcks() {
}
////////////////////////////////////////////////////////////////////////////////
-cms::MessageConsumer* ActiveMQSession::createConsumer(
- const cms::Destination* destination )
- throw ( cms::CMSException ) {
+cms::MessageConsumer* ActiveMQSession::createConsumer( const cms::Destination* destination ) {
try{
@@ -282,10 +280,8 @@ cms::MessageConsumer* ActiveMQSession::c
}
////////////////////////////////////////////////////////////////////////////////
-cms::MessageConsumer* ActiveMQSession::createConsumer(
- const cms::Destination* destination,
- const std::string& selector )
- throw ( cms::CMSException ) {
+cms::MessageConsumer* ActiveMQSession::createConsumer( const cms::Destination* destination,
+ const std::string& selector ) {
try{
@@ -297,11 +293,9 @@ cms::MessageConsumer* ActiveMQSession::c
}
////////////////////////////////////////////////////////////////////////////////
-cms::MessageConsumer* ActiveMQSession::createConsumer(
- const cms::Destination* destination,
- const std::string& selector,
- bool noLocal )
- throw ( cms::CMSException ) {
+cms::MessageConsumer* ActiveMQSession::createConsumer( const cms::Destination* destination,
+ const std::string& selector,
+ bool noLocal ) {
try{
@@ -351,12 +345,10 @@ cms::MessageConsumer* ActiveMQSession::c
}
////////////////////////////////////////////////////////////////////////////////
-cms::MessageConsumer* ActiveMQSession::createDurableConsumer(
- const cms::Topic* destination,
- const std::string& name,
- const std::string& selector,
- bool noLocal )
- throw ( cms::CMSException ) {
+cms::MessageConsumer* ActiveMQSession::createDurableConsumer( const cms::Topic* destination,
+ const std::string& name,
+ const std::string& selector,
+ bool noLocal ) {
try{
@@ -400,9 +392,7 @@ cms::MessageConsumer* ActiveMQSession::c
}
////////////////////////////////////////////////////////////////////////////////
-cms::MessageProducer* ActiveMQSession::createProducer(
- const cms::Destination* destination )
- throw ( cms::CMSException ) {
+cms::MessageProducer* ActiveMQSession::createProducer( const cms::Destination* destination ) {
try{
@@ -446,8 +436,7 @@ cms::MessageProducer* ActiveMQSession::c
}
////////////////////////////////////////////////////////////////////////////////
-cms::QueueBrowser* ActiveMQSession::createBrowser( const cms::Queue* queue )
- throw( cms::CMSException ) {
+cms::QueueBrowser* ActiveMQSession::createBrowser( const cms::Queue* queue ) {
try{
return ActiveMQSession::createBrowser( queue, "" );
@@ -457,8 +446,7 @@ cms::QueueBrowser* ActiveMQSession::crea
////////////////////////////////////////////////////////////////////////////////
cms::QueueBrowser* ActiveMQSession::createBrowser( const cms::Queue* queue,
- const std::string& selector )
- throw( cms::CMSException ) {
+ const std::string& selector ) {
try{
@@ -488,8 +476,7 @@ cms::QueueBrowser* ActiveMQSession::crea
}
////////////////////////////////////////////////////////////////////////////////
-cms::Queue* ActiveMQSession::createQueue( const std::string& queueName )
- throw ( cms::CMSException ) {
+cms::Queue* ActiveMQSession::createQueue( const std::string& queueName ) {
try{
@@ -506,8 +493,7 @@ cms::Queue* ActiveMQSession::createQueue
}
////////////////////////////////////////////////////////////////////////////////
-cms::Topic* ActiveMQSession::createTopic( const std::string& topicName )
- throw ( cms::CMSException ) {
+cms::Topic* ActiveMQSession::createTopic( const std::string& topicName ) {
try{
@@ -524,8 +510,7 @@ cms::Topic* ActiveMQSession::createTopic
}
////////////////////////////////////////////////////////////////////////////////
-cms::TemporaryQueue* ActiveMQSession::createTemporaryQueue()
- throw ( cms::CMSException ) {
+cms::TemporaryQueue* ActiveMQSession::createTemporaryQueue() {
try{
@@ -543,8 +528,7 @@ cms::TemporaryQueue* ActiveMQSession::cr
}
////////////////////////////////////////////////////////////////////////////////
-cms::TemporaryTopic* ActiveMQSession::createTemporaryTopic()
- throw ( cms::CMSException ) {
+cms::TemporaryTopic* ActiveMQSession::createTemporaryTopic() {
try{
@@ -562,8 +546,7 @@ cms::TemporaryTopic* ActiveMQSession::cr
}
////////////////////////////////////////////////////////////////////////////////
-cms::Message* ActiveMQSession::createMessage()
- throw ( cms::CMSException ) {
+cms::Message* ActiveMQSession::createMessage() {
try{
@@ -576,8 +559,7 @@ cms::Message* ActiveMQSession::createMes
}
////////////////////////////////////////////////////////////////////////////////
-cms::BytesMessage* ActiveMQSession::createBytesMessage()
- throw ( cms::CMSException ) {
+cms::BytesMessage* ActiveMQSession::createBytesMessage() {
try{
@@ -590,8 +572,7 @@ cms::BytesMessage* ActiveMQSession::crea
}
////////////////////////////////////////////////////////////////////////////////
-cms::BytesMessage* ActiveMQSession::createBytesMessage( const unsigned char* bytes, int bytesSize )
- throw ( cms::CMSException ) {
+cms::BytesMessage* ActiveMQSession::createBytesMessage( const unsigned char* bytes, int bytesSize ) {
try{
@@ -604,8 +585,7 @@ cms::BytesMessage* ActiveMQSession::crea
}
////////////////////////////////////////////////////////////////////////////////
-cms::StreamMessage* ActiveMQSession::createStreamMessage()
- throw ( cms::CMSException ) {
+cms::StreamMessage* ActiveMQSession::createStreamMessage() {
try{
@@ -618,8 +598,7 @@ cms::StreamMessage* ActiveMQSession::cre
}
////////////////////////////////////////////////////////////////////////////////
-cms::TextMessage* ActiveMQSession::createTextMessage()
- throw ( cms::CMSException ) {
+cms::TextMessage* ActiveMQSession::createTextMessage() {
try{
@@ -632,8 +611,7 @@ cms::TextMessage* ActiveMQSession::creat
}
////////////////////////////////////////////////////////////////////////////////
-cms::TextMessage* ActiveMQSession::createTextMessage( const std::string& text )
- throw ( cms::CMSException ) {
+cms::TextMessage* ActiveMQSession::createTextMessage( const std::string& text ) {
try {
@@ -646,8 +624,7 @@ cms::TextMessage* ActiveMQSession::creat
}
////////////////////////////////////////////////////////////////////////////////
-cms::MapMessage* ActiveMQSession::createMapMessage()
- throw ( cms::CMSException ) {
+cms::MapMessage* ActiveMQSession::createMapMessage() {
try{
@@ -660,19 +637,17 @@ cms::MapMessage* ActiveMQSession::create
}
////////////////////////////////////////////////////////////////////////////////
-cms::Session::AcknowledgeMode ActiveMQSession::getAcknowledgeMode() const throw ( cms::CMSException ) {
+cms::Session::AcknowledgeMode ActiveMQSession::getAcknowledgeMode() const {
return this->ackMode;
}
////////////////////////////////////////////////////////////////////////////////
-bool ActiveMQSession::isTransacted() const throw ( cms::CMSException ) {
+bool ActiveMQSession::isTransacted() const {
return this->ackMode == Session::SESSION_TRANSACTED;
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::send(
- cms::Message* message, ActiveMQProducer* producer, util::Usage* usage )
- throw ( cms::CMSException ) {
+void ActiveMQSession::send( cms::Message* message, ActiveMQProducer* producer, util::Usage* usage ) {
try {
@@ -752,8 +727,8 @@ void ActiveMQSession::send(
}
////////////////////////////////////////////////////////////////////////////////
-cms::ExceptionListener* ActiveMQSession::getExceptionListener()
-{
+cms::ExceptionListener* ActiveMQSession::getExceptionListener() {
+
if( connection != NULL ) {
return connection->getExceptionListener();
}
@@ -762,8 +737,7 @@ cms::ExceptionListener* ActiveMQSession:
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::unsubscribe( const std::string& name )
- throw ( cms::CMSException ) {
+void ActiveMQSession::unsubscribe( const std::string& name ) {
try{
@@ -837,8 +811,7 @@ bool ActiveMQSession::isStarted() const
////////////////////////////////////////////////////////////////////////////////
void ActiveMQSession::createTemporaryDestination(
- commands::ActiveMQTempDestination* tempDestination )
- throw ( activemq::exceptions::ActiveMQException ) {
+ commands::ActiveMQTempDestination* tempDestination ) {
try {
@@ -861,8 +834,7 @@ void ActiveMQSession::createTemporaryDes
////////////////////////////////////////////////////////////////////////////////
void ActiveMQSession::destroyTemporaryDestination(
- commands::ActiveMQTempDestination* tempDestination )
- throw ( activemq::exceptions::ActiveMQException ) {
+ commands::ActiveMQTempDestination* tempDestination ) {
try {
@@ -882,9 +854,8 @@ void ActiveMQSession::destroyTemporaryDe
}
////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQSession::createTemporaryDestinationName()
- throw ( activemq::exceptions::ActiveMQException )
-{
+std::string ActiveMQSession::createTemporaryDestinationName() {
+
try {
return this->connection->getConnectionId().getValue() + ":" +
Long::toString( this->connection->getNextTempDestinationId() );
@@ -895,8 +866,7 @@ std::string ActiveMQSession::createTempo
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::oneway( Pointer<Command> command )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::oneway( Pointer<Command> command ) {
try{
this->checkClosed();
@@ -908,8 +878,7 @@ void ActiveMQSession::oneway( Pointer<Co
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::syncRequest( Pointer<Command> command, unsigned int timeout )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::syncRequest( Pointer<Command> command, unsigned int timeout ) {
try{
this->checkClosed();
@@ -921,7 +890,7 @@ void ActiveMQSession::syncRequest( Point
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::checkClosed() const throw( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::checkClosed() const {
if( closed ) {
throw ActiveMQException(
__FILE__, __LINE__,
@@ -930,8 +899,7 @@ void ActiveMQSession::checkClosed() cons
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::addConsumer( ActiveMQConsumer* consumer )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::addConsumer( ActiveMQConsumer* consumer ) {
try{
@@ -951,8 +919,7 @@ void ActiveMQSession::addConsumer( Activ
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::removeConsumer( const Pointer<ConsumerId>& consumerId, long long lastDeliveredSequenceId )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::removeConsumer( const Pointer<ConsumerId>& consumerId, long long lastDeliveredSequenceId ) {
try{
@@ -977,8 +944,7 @@ void ActiveMQSession::removeConsumer( co
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::addProducer( ActiveMQProducer* producer )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::addProducer( ActiveMQProducer* producer ) {
try{
@@ -998,8 +964,7 @@ void ActiveMQSession::addProducer( Activ
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::removeProducer( const Pointer<ProducerId>& producerId )
- throw ( activemq::exceptions::ActiveMQException ) {
+void ActiveMQSession::removeProducer( const Pointer<ProducerId>& producerId ) {
try{
@@ -1020,7 +985,7 @@ void ActiveMQSession::removeProducer( co
}
////////////////////////////////////////////////////////////////////////////////
-void ActiveMQSession::doStartTransaction() throw ( ActiveMQException ) {
+void ActiveMQSession::doStartTransaction() {
if( !this->isTransacted() ) {
throw ActiveMQException( __FILE__, __LINE__, "Not a Transacted Session" );