diff options
author | Alan Conway <aconway@apache.org> | 2006-09-21 18:26:31 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2006-09-21 18:26:31 +0000 |
commit | 474ed3cf1e125360d26dad4376e106e8b48541ac (patch) | |
tree | 4f1043da7f03a5ec230539a62afac3fb0f0f0b73 /cpp/broker/src/SessionHandlerFactoryImpl.cpp | |
parent | 82e07bb30905feb2c11bb6d9f3624f976ab070a5 (diff) | |
download | qpid-python-474ed3cf1e125360d26dad4376e106e8b48541ac.tar.gz |
Implemented topic pattern matching for the TopicExchange.
Corrected default bindings to use the exchange named "" rather than
"amqp.direct".
Added python and unit tests for all of the above.
Minor improvements to testlib.py, also some tests for testlib itself.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@448624 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/broker/src/SessionHandlerFactoryImpl.cpp')
-rw-r--r-- | cpp/broker/src/SessionHandlerFactoryImpl.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/cpp/broker/src/SessionHandlerFactoryImpl.cpp b/cpp/broker/src/SessionHandlerFactoryImpl.cpp index 661cb4ef81..280e89c475 100644 --- a/cpp/broker/src/SessionHandlerFactoryImpl.cpp +++ b/cpp/broker/src/SessionHandlerFactoryImpl.cpp @@ -22,10 +22,19 @@ using namespace qpid::broker; using namespace qpid::io; +namespace +{ +const std::string empty; +const std::string amq_direct("amq.direct"); +const std::string amq_topic("amq.topic"); +const std::string amq_fanout("amq.fanout"); +} + SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(u_int32_t _timeout) : timeout(_timeout), cleaner(&queues, timeout/10){ - exchanges.declare(new DirectExchange("amq.direct")); - exchanges.declare(new TopicExchange("amq.topic")); - exchanges.declare(new FanOutExchange("amq.fanout")); + exchanges.declare(new DirectExchange(empty)); // Default exchange. + exchanges.declare(new DirectExchange(amq_direct)); + exchanges.declare(new TopicExchange(amq_topic)); + exchanges.declare(new FanOutExchange(amq_fanout)); cleaner.start(); } @@ -35,6 +44,4 @@ SessionHandler* SessionHandlerFactoryImpl::create(SessionContext* ctxt){ SessionHandlerFactoryImpl::~SessionHandlerFactoryImpl(){ cleaner.stop(); - exchanges.destroy("amq.direct"); - exchanges.destroy("amq.topic"); } |