summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-11-03 13:44:21 +0000
committerGordon Sim <gsim@apache.org>2006-11-03 13:44:21 +0000
commit15a915878c787e6d5ed8330a8dd4375ec885a6c0 (patch)
treee580dbbeb7c61c4dc1a1348156c1970e09311b10 /cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
parent20b96a39f539bf5181a58d1235f521d6a544bc47 (diff)
downloadqpid-python-15a915878c787e6d5ed8330a8dd4375ec885a6c0.tar.gz
Added some methods to MessageStore interface and hooked these in where appropriate.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@470810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp')
-rw-r--r--cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
index 9883c94a25..76723881dc 100644
--- a/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
+++ b/cpp/src/qpid/broker/SessionHandlerFactoryImpl.cpp
@@ -33,7 +33,9 @@ const std::string amq_fanout("amq.fanout");
const std::string amq_match("amq.match");
}
-SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(u_int32_t _timeout) : timeout(_timeout), cleaner(&queues, timeout/10){
+SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(u_int32_t _timeout) :
+ queues(store.get()), timeout(_timeout), cleaner(&queues, timeout/10)
+{
exchanges.declare(empty, DirectExchange::typeName); // Default exchange.
exchanges.declare(amq_direct, DirectExchange::typeName);
exchanges.declare(amq_topic, TopicExchange::typeName);
@@ -42,10 +44,17 @@ SessionHandlerFactoryImpl::SessionHandlerFactoryImpl(u_int32_t _timeout) : timeo
cleaner.start();
}
-SessionHandler* SessionHandlerFactoryImpl::create(SessionContext* ctxt){
+void SessionHandlerFactoryImpl::recover()
+{
+ if(store.get()) store->recover(queues);
+}
+
+SessionHandler* SessionHandlerFactoryImpl::create(SessionContext* ctxt)
+{
return new SessionHandlerImpl(ctxt, &queues, &exchanges, &cleaner, timeout);
}
-SessionHandlerFactoryImpl::~SessionHandlerFactoryImpl(){
+SessionHandlerFactoryImpl::~SessionHandlerFactoryImpl()
+{
cleaner.stop();
}