From ce7678789fe3e8c5caebb59a26aa418fbb95e5d3 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 26 May 2008 18:10:05 +0000 Subject: Changes to Session API: - Session is synchronous, no futures. - AsyncSession is async, returns futures. - Conversion functions sync(s) async(s) return a sync/async view of session s. - Connection::newSession - takes name, no timeout - SessionBase::getId - returns SessionId not UUID. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@660258 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/Dispatcher.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/client/Dispatcher.cpp') diff --git a/cpp/src/qpid/client/Dispatcher.cpp b/cpp/src/qpid/client/Dispatcher.cpp index 2bbe5a122f..0bd0cb9d08 100644 --- a/cpp/src/qpid/client/Dispatcher.cpp +++ b/cpp/src/qpid/client/Dispatcher.cpp @@ -37,7 +37,8 @@ using qpid::sys::Thread; namespace qpid { namespace client { -Subscriber::Subscriber(Session& s, MessageListener* l, AckPolicy a) : session(s), listener(l), autoAck(a) {} +Subscriber::Subscriber(const Session& s, MessageListener* l, AckPolicy a) + : session(s), listener(l), autoAck(a) {} void Subscriber::received(Message& msg) { @@ -47,7 +48,7 @@ void Subscriber::received(Message& msg) } } -Dispatcher::Dispatcher(Session& s, const std::string& q) +Dispatcher::Dispatcher(const Session& s, const std::string& q) : session(s), running(false), autoStop(true) { queue = q.empty() ? @@ -88,7 +89,7 @@ void Dispatcher::run() } } } - session.sync(); // Make sure all our acks are received before returning. + sync(session).sync(); // Make sure all our acks are received before returning. } catch (const ClosedException&) {} //ignore it and return catch (const std::exception& e) { -- cgit v1.2.1