summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/client/Dispatcher.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Adjust to new location of state_saver in Boost 1.40; fixes QPID-2090Stephen D. Huston2009-09-091-2/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@813092 13f79535-47bb-0310-9956-ffa450edef68
* Add directory to #includeAlan Conway2009-07-141-5/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@793909 13f79535-47bb-0310-9956-ffa450edef68
* Remove client::Execution and FrameSet from the public API.Alan Conway2009-05-061-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@772182 13f79535-47bb-0310-9956-ffa450edef68
* Move client::Dispatcher destructor from .cpp to .h to avoid having to export ↵Stephen D. Huston2009-04-231-4/+1
| | | | | | it on Windows; Added new client files to client.vcproj git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@768081 13f79535-47bb-0310-9956-ffa450edef68
* Apply PIMPL pattern to qpid::client::Message.Alan Conway2009-04-201-1/+2
| | | | | | | Hide implementation of Message, move framing::MethodContent and framing::TransferContent out of public API. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@766899 13f79535-47bb-0310-9956-ffa450edef68
* Cleaned up some un-necessary #include dependencies.Alan Conway2009-04-151-0/+3
| | | | | | | Removed un-used LatencyMetric hack. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@765285 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1718: Ensure that cancellation caused by e.g. ↵Gordon Sim2009-03-051-2/+1
| | | | | | SubscriptionManager::get() doesn't close dispatch queue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@750622 13f79535-47bb-0310-9956-ffa450edef68
* Avoid spurious error message for TransportFailureGordon Sim2008-11-241-0/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@720178 13f79535-47bb-0310-9956-ffa450edef68
* SubscriptionManager and Dispatcher were missing wait() methods meaning that ↵Gordon Sim2008-11-061-0/+5
| | | | | | if start was called there was no way to join with the dispatch thread and shutdown cleanly. Fixed by adding that method. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@711838 13f79535-47bb-0310-9956-ffa450edef68
* Various fixes arising from testing client failover:Gordon Sim2008-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | * introduced new exception type for signalling connection failure (as distinct from any logical connection errors) * ConnectionImpl::closeInternal(): take copy of session map to prevent concurrent modification (by the same thread) as sessions are deleted and erase themselves. * ConnectionImpl::shutdown: hold lock before calling closeInternal(); mark handler failed before informing sessions of failure * SessionImpl::connectionBroker(): remove code as its rather meaningless * Don't swallow exceptions in Dispatcher * Handle exceptions in FailoverListener * Take weak_ptr to ConnectionImpl on constructor of Connector, then convert to shared_ptr when 'receiver' thread is started. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@710106 13f79535-47bb-0310-9956-ffa450edef68
* Client API change: Centralize access to subscription status, better control ↵Alan Conway2008-10-251-29/+6
| | | | | | | | | | | | | | | | | | | of acquire/accept. client/AckPolicy: removed, functionality moved to Subscription and SubscriptionSettings client/SubscriptionSettings: struct aggregates flow control & accept-acquire parameters for subscribe. client/Subscription: represents active subscription. Query settings, unacked messages, manual accept/acquire client/SubscriptionManager: use AcceptMode, AcquireMode enums rather than confusing bools. Issues addressed by the change: - old use of bool for acceptMode was inverted wrt AMQP enum values, bools are confusing. - old AckPolicy was broken - not possible to access the instance associated with an active subscription - old AckPolicy did not provide a way to do manual acquire, only accept. - setting values on SubscriptionManager to apply to subsequent subscriptions is awkward & error-prone, now can use SubscriptionSettings to control on each subscribe individually. - a subscription is a central concept in AMQP, it deserves to be a class. Subscription and SubscriptionSettings provides a single point for future expansion of interactions with a a Subscription. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@707808 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1367 Mick Goulish: improvements to client-side failover.Alan Conway2008-10-171-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705668 13f79535-47bb-0310-9956-ffa450edef68
* Suppress logging expected errors in tests.Alan Conway2008-10-171-9/+10
| | | | | | | Improved log messages for connection, session errors. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705661 13f79535-47bb-0310-9956-ffa450edef68
* Fix race in cluster causing incorrect known-broker lists to be sent to clients.Alan Conway2008-10-161-6/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@705287 13f79535-47bb-0310-9956-ffa450edef68
* Minor cleanup for client failover.Alan Conway2008-10-141-10/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@704637 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1340 froM Mick Goulish: preliminary client-side failover support.Alan Conway2008-10-101-2/+16
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703319 13f79535-47bb-0310-9956-ffa450edef68
* Tighten up sync-correctness in SubscriptionManager & Dispatcher.Alan Conway2008-05-271-1/+1
| | | | | | | Add a flush to SessionBase_0_10::sync() so it syncs in both directions. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@660643 13f79535-47bb-0310-9956-ffa450edef68
* Changes to Session API:Alan Conway2008-05-261-3/+4
| | | | | | | | | | | - 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
* From Jonathan Robie:Alan Conway2008-05-131-3/+5
| | | | | | | | | | | | | | | https://issues.apache.org/jira/browse/QPID-1056: Python examples for the xml exchange. https://issues.apache.org/jira/browse/QPID-1057 Fixes to the XmlExchange.cpp that prevent it from crashing the broker when used with python clients that don't send application header properties git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@656005 13f79535-47bb-0310-9956-ffa450edef68
* Added sync() to ensure all acks are receivd before exiting the Dispatcher loop.Alan Conway2008-05-131-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@655983 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: send message-accept for acks (as well as completion)Gordon Sim2008-04-211-2/+2
| | | | | | | | * AckPolicy now maintains a set of transfered messages for cumulative accepts git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@650159 13f79535-47bb-0310-9956-ffa450edef68
* QPID-920: converted c++ client to use final 0-10 protocolGordon Sim2008-04-201-1/+1
| | | | | | | | | | * connection handler converted to using invoker & proxy and updated to final method defs * SessionCore & ExecutionHandler replace by SessionImpl * simplified handling of completion & results, removed handling of responses git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@649915 13f79535-47bb-0310-9956-ffa450edef68
* Start moving towards final 0-10 spec:Gordon Sim2008-02-211-3/+2
| | | | | | | | | | | | | * marked preview spec as 99-0 to distinguish it from 0-10 (which will now be used for the final version) * modified python client to treat 99-0 as 0-10 for now * modified broker to have two paths for the two different versions: 99-0 uses PreviewConnection, PreviewConnectionHandler and PreviewSessionHandler which are straight copy & pastes of the Connection, ConnectionHandler and SessionHandler now associated with 0-10 (so we can migrate the 0-10 path to the final spec without affecting clients working with the preview version) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@629883 13f79535-47bb-0310-9956-ffa450edef68
* Check valid listener (or handler) exist and log error if not. See QPID-783.Gordon Sim2008-02-111-4/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@620479 13f79535-47bb-0310-9956-ffa450edef68
* Improved/additional client API tests.Alan Conway2008-01-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced InProcessBroker with a more accurate loopback BrokerFixture. - Added asserts for mutex/condition/thread errors in debug build. - Added client tests for several exception conditions. - Added peer address to log ouput, client/server distinguished by (addr) or [addr] - Fixed various deadlocks & races exposed by the new asserts & tests. File-by-file: New BrokerFixture replaces InProcessBroker D src/tests/InProcessBroker.h M src/tests/BrokerFixture.h M src/tests/SocketProxy.h M src/tests/Makefile.am Made it run a bit faster. M src/tests/quick_perftest Redundant D src/tests/APRBaseTest.cpp Updated tests to use BrokerFixture M src/tests/ClientChannelTest.cpp M src/tests/exception_test.cpp M src/tests/ClientSessionTest.cpp Print thread IDs in decimal, same as GDB. M src/qpid/log/Logger.cpp Assert mutex/condition ops in debug build. M src/qpid/sys/posix/check.h M src/qpid/sys/posix/Mutex.h M src/qpid/sys/posix/Condition.h M src/qpid/sys/posix/Thread.h Added toFd() so SocketProxy can use ::select() M src/qpid/sys/Socket.h M src/qpid/sys/posix/Socket.cpp Fixes for races & deadlocks shown up by new tests & asserts. Mostly shutdown/close issues. M src/qpid/client/ConnectionHandler.h M src/qpid/client/ConnectionImpl.cpp M src/qpid/client/Demux.h M src/qpid/client/SessionCore.cpp M src/qpid/client/ConnectionHandler.cpp M src/qpid/client/Connector.h M src/qpid/client/Demux.cpp M src/qpid/client/Dispatcher.cpp M src/qpid/client/ConnectionImpl.h Logging peer address. M src/qpid/sys/AsynchIOAcceptor.cpp git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@615063 13f79535-47bb-0310-9956-ffa450edef68
* examples/Makefile.am:Alan Conway2008-01-231-1/+1
| | | | | | | | | | | | | | - verify.tar target, tars up verify script for easy transport to installation. examples/examples/pub-sub/verify.in: fixed typeo. examples/verify: don't kill the pub-sub listener, it should exit gracefully. src/qpid/client/Dispatcher.cpp src/qpid/client/SubscriptionManager.cpp - Fix uninitialized autoStop member variable. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@614587 13f79535-47bb-0310-9956-ffa450edef68
* Summary:Alan Conway2007-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced InProcessBroker with BrokerFixture, uses a full loopback broker for more realistic tests. - Extracted non-generated parts of Session_0_10 into SessionBase. - Sundry small fixes. src/tests/BrokerFixture.h - in process broker with loopback connections. - tests can force a disorderly disconnect. src/qpid/client/Connector.h - back door to private members for BrokerFixture. - close() in destructor to avoid leaks. src/qpid/client/ConnectionImpl.h,cpp: - close() in destructor, to fix hang when destroyed without being closed. src/qpid/client/CompletionTracker.h,.cpp: - Fixed race in close/add. src/qpid/client/SessionBase.h,cpp: - Extracted all non-generated code from Session_0_10 into SessionBase - Added sync() src/tests/exception_test.cpp: Converted to boost & BrokerFixture src/tests/ClientChannelTest.cpp, ClientSessionTest.cpp: Use BrokerFixture git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@602182 13f79535-47bb-0310-9956-ffa450edef68
* Altered topic test to use the new session api.Gordon Sim2007-11-301-11/+15
| | | | | | | | Exposed start() through the subscription manager in addition to run(). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@599832 13f79535-47bb-0310-9956-ffa450edef68
* Add unit_test.h to distribution.Alan Conway2007-11-281-13/+4
| | | | | | | Updated/removed sundry FIXME comments. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@599128 13f79535-47bb-0310-9956-ffa450edef68
* client::SubscriptionManager:Alan Conway2007-11-071-44/+36
| | | | | | | | | | | | | | | | | - Added autoStop support. - Added LocalQueue subscriptions. - Expose AckPolicy settings to user. client::Message: - incoming Messages carry their session for acknowledge perftest: (see perftest --help for details...) - allow multiple consumers. - 3 queue modes: shared, fanout, topic. - set size of messages git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592869 13f79535-47bb-0310-9956-ffa450edef68
* Added LocalQueue subscriptions. LocalQueue::pop() provides a "pull"Alan Conway2007-11-071-2/+2
| | | | | | | alternative to the MessageListener::received() "push" API. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@592803 13f79535-47bb-0310-9956-ffa450edef68
* client/BlockingQueue.h, sys/ConcurrentQueue.h: merged to sys/BlockingQueue.hAlan Conway2007-10-291-2/+2
| | | | | | | | | - updated all users qpid/Exception.h: Removed unimplemented clone() function. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@589857 13f79535-47bb-0310-9956-ffa450edef68
* Rename client::Session as client::Session_0_10Alan Conway2007-10-291-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@589794 13f79535-47bb-0310-9956-ffa450edef68
* Start execution mark from -1 (0xFFFFFFFF)Gordon Sim2007-09-261-6/+6
| | | | | | | | Rename ackFrequency as ackBatchSize in Dispatcher git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@579553 13f79535-47bb-0310-9956-ffa450edef68
* Renamed the following files for consistency:Alan Conway2007-09-251-1/+1
| | | | | | | | | | | | | | | | | | broker/BrokerExchange.cpp -> Exchange.cpp broker/BrokerExchange.h -> Exchange.h broker/BrokerQueue.cpp -> Queue.cpp broker/BrokerQueue.h -> Queue.h client/ClientChannel.cpp -> Channel.cpp client/ClientChannel.h -> Channel.h client/ClientConnection.cpp -> Connection.cpp client/ClientExchange.cpp -> Exchange.cpp client/ClientExchange.h -> Exchange.h client/ClientMessage.h -> Message.h client/ClientQueue.cpp -> Queue.cpp client/ClientQueue.h -> Queue.h git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@579340 13f79535-47bb-0310-9956-ffa450edef68
* Added Dispatcher class (plus test). This converts incoming MessageTransfer ↵Gordon Sim2007-09-181-0/+150
framesets to Messages and pumps them to registered listeners. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@576935 13f79535-47bb-0310-9956-ffa450edef68