diff options
author | Alan Conway <aconway@apache.org> | 2007-10-26 19:48:31 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2007-10-26 19:48:31 +0000 |
commit | f61e1ef7589da893b9b54448224dc0961515eb40 (patch) | |
tree | 258ac1fd99ac122b105ad90ad4394d8d544c5cbf /cpp/src/qpid/broker/MessageHandlerImpl.cpp | |
parent | c5294d471ade7a18c52ca7d4028a494011c82293 (diff) | |
download | qpid-python-f61e1ef7589da893b9b54448224dc0961515eb40.tar.gz |
Session resume support in client & broker: Client can resume a session
after voluntary suspend() or network failure. Frames lost in network
failure are automatically re-transmitted for transparent re-connection.
client::Session improvements:
- Locking to avoid races between network & user threads.
- Replaced client::StateManager with sys::StateMonitor - avoid heap allocation.
qpid::Exception clean up:
- use QPID_MSG consistently to format exception messages.
- throw typed exceptions (in reply_exceptions.h) for AMQP exceptions.
- re-throw correct typed exception on client for exceptions from broker.
- Removed QpidError.h
rubygen/templates/constants.rb:
- constants.h: Added FOO_CLASS_ID and FOO_BAR_METHOD_ID constants.
- reply_constants.h: Added throwReplyException(code, text)
log::Logger:
- Fixed shutdown race in Statement::~Initializer()
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@588761 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/MessageHandlerImpl.cpp')
-rw-r--r-- | cpp/src/qpid/broker/MessageHandlerImpl.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/cpp/src/qpid/broker/MessageHandlerImpl.cpp b/cpp/src/qpid/broker/MessageHandlerImpl.cpp index b12910893a..834ce0a203 100644 --- a/cpp/src/qpid/broker/MessageHandlerImpl.cpp +++ b/cpp/src/qpid/broker/MessageHandlerImpl.cpp @@ -16,7 +16,7 @@ * */ -#include "qpid/QpidError.h" +#include "qpid/Exception.h" #include "qpid/log/Statement.h" #include "MessageHandlerImpl.h" #include "qpid/framing/FramingContent.h" @@ -56,39 +56,39 @@ MessageHandlerImpl::cancel(const string& destination ) void MessageHandlerImpl::open(const string& /*reference*/) { - throw ConnectionException(540, "References no longer supported"); + throw NotImplementedException("References no longer supported"); } void MessageHandlerImpl::append(const std::string& /*reference*/, const std::string& /*bytes*/) { - throw ConnectionException(540, "References no longer supported"); + throw NotImplementedException("References no longer supported"); } void MessageHandlerImpl::close(const string& /*reference*/) { - throw ConnectionException(540, "References no longer supported"); + throw NotImplementedException("References no longer supported"); } void MessageHandlerImpl::checkpoint(const string& /*reference*/, const string& /*identifier*/ ) { - throw ConnectionException(540, "References no longer supported"); + throw NotImplementedException("References no longer supported"); } void MessageHandlerImpl::resume(const string& /*reference*/, const string& /*identifier*/ ) { - throw ConnectionException(540, "References no longer supported"); + throw NotImplementedException("References no longer supported"); } void MessageHandlerImpl::offset(uint64_t /*value*/ ) { - throw ConnectionException(540, "References no longer supported"); + throw NotImplementedException("References no longer supported"); } void @@ -97,19 +97,19 @@ MessageHandlerImpl::get(uint16_t /*ticket*/, const string& /*destination*/, bool /*noAck*/ ) { - throw ConnectionException(540, "get no longer supported"); + throw NotImplementedException("get no longer supported"); } void MessageHandlerImpl::empty() { - throw ConnectionException(540, "empty no longer supported"); + throw NotImplementedException("empty no longer supported"); } void MessageHandlerImpl::ok() { - throw ConnectionException(540, "Message.Ok no longer supported"); + throw NotImplementedException("Message.Ok no longer supported"); } void @@ -134,7 +134,7 @@ MessageHandlerImpl::subscribe(uint16_t /*ticket*/, { Queue::shared_ptr queue = state.getQueue(queueName); if(!destination.empty() && state.exists(destination)) - throw ConnectionException(530, "Consumer tags must be unique"); + throw NotAllowedException(QPID_MSG("Consumer tags must be unique")); string tag = destination; state.consume(MessageDelivery::getMessageDeliveryToken(destination, confirmMode, acquireMode), @@ -165,7 +165,7 @@ void MessageHandlerImpl::flow(const std::string& destination, u_int8_t unit, u_i state.addByteCredit(destination, value); } else { //unknown - throw ConnectionException(502, boost::format("Invalid value for unit %1%") % unit); + throw SyntaxErrorException(QPID_MSG("Invalid value for unit " << unit)); } } @@ -179,7 +179,7 @@ void MessageHandlerImpl::flowMode(const std::string& destination, u_int8_t mode) //window state.setWindowMode(destination); } else{ - throw ConnectionException(502, boost::format("Invalid value for mode %1%") % mode); + throw SyntaxErrorException(QPID_MSG("Invalid value for mode " << mode)); } } |