summaryrefslogtreecommitdiff
path: root/cpp/src
Commit message (Collapse)AuthorAgeFilesLines
* Some refactoring towards a more decoupled handler chain structure:Gordon Sim2007-07-1719-193/+506
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Connection no longer depends on Channel; it contains a map of FrameHandler::Chains. (The construction of the chains still refers to specific handlers). * Channel is no longer tied to ChannelAdapter through inheritance. The former is independent of any particular handler chain or protocol version, the latter is still used by ConnectionAdapter and SemanticHandler in the 0-9 chain. * A DeliveryAdapter interface has been introduced as part of the separation of ChannelAdapter from Channel. This is intended to adapt from a version independent core to version specific mechanisms for sending messages. i.e. it fulfills the same role for outputs that e.g. BrokerAdapter does for inputs. (Its not perfect yet by any means but is a step on the way to the correct model I think). * The connection related methods sent over channel zero are implemented in their own adapter (ConnectionAdapter), and are entirely separate from the semantic layer. The channel control methods are still bundled with the proper semantic layer methods; they too can be separated but would have to share the request id with the semantic method handler due to the nature of the 0-9 WIP. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556846 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/sys/Serializer.h: Serialize calls to a function,Alan Conway2007-07-168-15/+448
| | | | | | | | | by queueing and dispatching in a separate thread if necessary. * src/qpid/sys/*/Mutex.h: trylock to return a bool. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556679 13f79535-47bb-0310-9956-ffa450edef68
* Add missing header file to distribution.Alan Conway2007-07-131-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556069 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/sys/ConcurrentQueue.h: Thread-safe queue with atomic pop()Alan Conway2007-07-133-0/+279
| | | | | | | | | | | | | | * src/tests/ConcurrentQueue.cpp: Experimental code to compare a dual-vector, dual-lock implementation with a simple locked deque. Results indicate the more complex design does not perform any better, so ConcurrentQueue.h uses the simpler design. Not part of default test harness, run by hand to see results. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556045 13f79535-47bb-0310-9956-ffa450edef68
* * Add libuuid to libcommon link (for when apr goes away)Andrew Stitcher2007-07-127-123/+431
| | | | | | | | * Latest version of AsynchIO code git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@555455 13f79535-47bb-0310-9956-ffa450edef68
* refactoring: Gordon Sim2007-07-0912-143/+296
| | | | | | | | | * separated out the connection level method handling from semantic level (session/channel level should also be separated) * reduce coupling between Connection and Channel git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@554590 13f79535-47bb-0310-9956-ffa450edef68
* - replaced Mutexes with 2 RWlocks, about 2% less time in wait-state with change.Carl C. Trieloff2007-07-052-13/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553611 13f79535-47bb-0310-9956-ffa450edef68
* - missing APR mutex update - should now all build againCarl C. Trieloff2007-07-051-0/+52
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553576 13f79535-47bb-0310-9956-ffa450edef68
* - Added RW lockCarl C. Trieloff2007-07-0514-30/+124
| | | | | | | | | | | - Updated all exchanges to us RW lock - Updated all registries to us RW lock - Still need to do (client, channel, message and queues) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553549 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/cluster/SessionFrame.cpp, .h: Wrap AMQFrame withAlan Conway2007-07-0514-85/+217
| | | | | | | | | | | | | | | | | | | | session UUID and direction. * src/qpid/cluster/Cluster.cpp, .h: Use SessionFrame. * src/qpid/framing/AMQFrame.h, .cpp: Added setBody(), inline getBody() * src/qpid/framing/Uuid.h, .cpp: Clean up constructors, inline. * src/qpid/framing/Buffer.h: Put/get byte*, size_T. * src/qpid/cluster/SessionManager.cpp, .h: - Maintain the session map. - Handle frames from cluster, dispatch to proper channels. - Implement HandlerUpdater for new channels and maintains git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553543 13f79535-47bb-0310-9956-ffa450edef68
* Fix for QPID-534. Get now detects closure correctly. Also fixed broker to ↵Gordon Sim2007-07-0512-30/+148
| | | | | | allow channel.close-ok (and fixed client to send it). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553441 13f79535-47bb-0310-9956-ffa450edef68
* Encode/decode for UUIDs.Alan Conway2007-07-045-1/+44
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553083 13f79535-47bb-0310-9956-ffa450edef68
* 2007-07-02 <aconway@redhat.comAlan Conway2007-07-0415-346/+416
| | | | | | | | | | | | | | | | * qpid/sys/Shlib.h, .cpp: Portable shared library abstraction. - Shlib: load, unload, getSymbol - AutoShlib: unload in destructor. * qpid/sys/apr/Shlib.cpp sys/posix/Shlib.cpp: APR/Posix impls * qpid/sys/Module.h: Reimplemented Module in terms of AutoShlib. * qpid/Plugin.cpp, .h: Removed dlopen - use Shlib instead. * qpid/broker/Broker.cpp: Added missing #include "qpid/log/Statement.h" * tests/Shlib.cpp, shlibtest.cpp: Unit test git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553056 13f79535-47bb-0310-9956-ffa450edef68
* Fix error from previous commit.Alan Conway2007-07-041-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553033 13f79535-47bb-0310-9956-ffa450edef68
* * cluster/ClasifierHandler: classifies frames for clustering treatment.Alan Conway2007-07-036-6/+156
| | | | | | | Currently classifies wiring separately from everything else. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553024 13f79535-47bb-0310-9956-ffa450edef68
* Added UUID type based on libuuid from e2fsprogs package.Alan Conway2007-07-035-0/+170
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552970 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/cluster_client.cpp: Cluster client test not yet included in ↵Alan Conway2007-07-034-0/+118
| | | | | | | | | | test harness. * src/tests/start_cluster,src/tests/stop_cluster: scripts to start/stop cluster of processes on localhost. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552941 13f79535-47bb-0310-9956-ffa450edef68
* Fix (and test) for QPID-407. Messages are requeued at the head rather than ↵Gordon Sim2007-07-034-9/+24
| | | | | | the tail. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552862 13f79535-47bb-0310-9956-ffa450edef68
* Autodeletable shared queues are now deleted as soon as the consumer count ↵Gordon Sim2007-07-0313-158/+22
| | | | | | | | | | drops to zero (i.e. there is no timeout). This closes QPID-533. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552751 13f79535-47bb-0310-9956-ffa450edef68
* 2007-06-30 <aconway@redhat.com>Alan Conway2007-07-0217-429/+353
| | | | | | | | | | | | | | | | | | | | | | | | | | | * src/qpid/cluster/Cluster.cpp: Refactor - expose 4 handler points for all traffic to/from cluster. Removed HandlerUpdater functionality, separate class. Cluster only deals with membership and connecting the 4 handler points to CPG multicast. * src/tests/cluster.mk: Dropped newgrp ais wrapper scripts, its much simpler if the user just does "newgrp ais" before building. * src/tests/ais_check: Test script to check if users gid is ais and give clear notice if not. * src/tests/Cluster.cpp: Updated for changes to Cluster. * src/qpid/cluster/Cpg.cpp: Better messages for common errors. * Handler.h: Remove nextHandler() minor convenience is outweighted by risk of undetected errors if handlers that expect next() to be set are called when it's not set. * src/qpid/cluster/Cpg.cpp: Added logging. Replaced boost::function with traditional virtual interface (nasty stack traces.) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552614 13f79535-47bb-0310-9956-ffa450edef68
* Small fixes to enable the --disable-apr-platform build to carry on compilingAndrew Stitcher2007-07-022-6/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552535 13f79535-47bb-0310-9956-ffa450edef68
* Updated AutoDelete, now only run when auto delete queues exist andCarl C. Trieloff2007-06-295-44/+26
| | | | | | | | | | | | additional auto delete queues being declared. cuts 1-3% of CPU time for concurrent publisher run. Could do with some more auto delete tests... git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552037 13f79535-47bb-0310-9956-ffa450edef68
* * More work on asychronous network IOAndrew Stitcher2007-06-297-44/+506
| | | | | | | * Fix of current EventQueue code to carry on compiling git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@552001 13f79535-47bb-0310-9956-ffa450edef68
* Temporarily disable Cluster test while I'm fixing problems with it.Alan Conway2007-06-291-4/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551985 13f79535-47bb-0310-9956-ffa450edef68
* * Summary:Alan Conway2007-06-2934-312/+651
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Improved plugin framework and HandlerUpdater interface. - Cluster handlers for traffic to/from cluster. - Cluster HandlerUpdater configures channel chains for cluster. - Cluster PluginProvider registers cluster objects with broker. * src/qpid/framing/AMQFrame.h: Made data members public. Handlers need to be able to modify frame data, getters/setters are just a nuisance here. * src/tests/Cluster.cpp: Updated for cluster changes, using handlers instead of friendship to hook test into Cluster code. * src/qpid/framing/amqp_types.h: Added CHANNEL_MAX and CHANNEL_HIGH_BIT constants. * src/qpid/framing/HandlerUpdater.h: Renamed ChannelInitializer, broke dependency on broker channel types. * src/qpid/framing/Handler.h: Added constructors and nextHandler() * src/qpid/framing/AMQFrame.h (class AMQFrame): Inlined getChannel() * src/qpid/cluster/ClusterPluginProvider.cpp: Provider for cluster plugins. * src/qpid/cluster/Cluster.cpp: Use ChannelManager. Factor out plugin details to ClusterPluginProvider. * src/qpid/cluster/ChannelManager.h: Insert cluster handlers into channel chains, route frames between cluster and channels. * src/qpid/broker/BrokerAdapter.cpp (startOk): use CHANNEL_MAX constant. * src/qpid/broker/Broker.cpp: - Refactored for new plugin framework. - Added getUrl(). * src/qpid/Url.h: Added constructor from Address. * src/qpid/Plugin.h: Generalized plugin framework, broke dependency on Broker interfaces. We may want to use plug-ins for clients also at some point. * src/tests/run_test: Fix bug when VALGRIND is not set. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551981 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/broker/Plugin.h: Base class for plug-in objects.Alan Conway2007-06-275-1/+199
| | | | | | | | | | | | | | | Plugins can contribute configuration options and can call extension point functions on the broker. * src/qpid/broker/ChannelInitializer.h: Interface for plug-in objects that want to modify newly created channels, e.g. to modify the handler chains. * src/qpid/broker/Broker.h: Added extension point for plug-ins to contribute ChannelInitializer objects. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551363 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/framing/ChannelAdapter.cpp: Use handler chainsAlan Conway2007-06-2721-202/+126
| | | | | | | | | | | | | | | | | | | for in and outbound frames. * src/qpid/framing/InputHandler.h, OutputHandler.h, FrameHandler.h: All handlers pass AMQFrame& and have consistent memory management. Terminal OutputHandlers used to take ownership and delete frame, now they make a shallow copy instead. * src/qpid/framing/Handler.h, FrameHandler.h: Simplified. * src/qpid/client/ClientConnection.cpp: * src/qpid/broker/Connection.cpp: * src/qpid/broker/BrokerChannel.cpp: Update for ChannelAdapter changes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551336 13f79535-47bb-0310-9956-ffa450edef68
* Fixed missing POSIX implementation of Acceptor::getHostAndrew Stitcher2007-06-273-28/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551327 13f79535-47bb-0310-9956-ffa450edef68
* Fixes and tests:Gordon Sim2007-06-274-5/+20
| | | | | | | | | * ExchangeRegistry::get() caused a pair to be inserted with a 'null' pointer if the xchange didn't exist * HeadersExchange::isBound() didn't check queue param git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551197 13f79535-47bb-0310-9956-ffa450edef68
* Added preview of exchange- and binding- query methods that have been ↵Gordon Sim2007-06-2716-3/+279
| | | | | | approved for 0-10. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551144 13f79535-47bb-0310-9956-ffa450edef68
* Fixed client leak and python tests portAlan Conway2007-06-273-20/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@551014 13f79535-47bb-0310-9956-ffa450edef68
* Fix shutdown race in Connector.Alan Conway2007-06-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550996 13f79535-47bb-0310-9956-ffa450edef68
* Make check now starts a broker on a dynamically assigned port, soAlan Conway2007-06-2725-683/+507
| | | | | | | | | | | | | | | | | | | | | | | | | | | | multiple qpid builds on one host will not conflict. * src/tests/run_test, start_broker, kill_broker: Broker writes port to file, run_test sets QPID_PORT in environment of all tests. * src/tests/topic_publisher.cpp, topic_listener.cpp, client_test.cpp: All test clients use TestOptions to parse options from args and env. * src/qpid/Options.h: Renamed from CommonOptions.h Simplified use of Options class. * src/qpid/Url.h: Renamed defaultPort constant. * src/tests/logging.cpp: * src/tests/interop_runner.cpp: * src/tests/TestOptions.h: * src/qpidd.cpp: * src/qpid/log/Options.cpp: * src/qpid/log/Logger.cpp: * src/qpid/broker/Broker.cpp: Updated for changes to Options. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550993 13f79535-47bb-0310-9956-ffa450edef68
* * src/tests/cluster.mk: Replace sudo with newgrp for ais tests.Alan Conway2007-06-263-13/+14
| | | | | | | | | Skip ais tests with warning if user is not in ais group. * src/tests/Makefile.am: Enable valgrind for all tests. * src/qpid/client/Connector.cpp: Fix memory leak. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550915 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/framing/Handler.h: Tempates for handlers and handler chains.Alan Conway2007-06-265-8/+173
| | | | | | | | * src/qpid/framing/FrameHandler.h: Use Handler.h templates. * src/tests/Handler.cpp: handler chain test. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550846 13f79535-47bb-0310-9956-ffa450edef68
* Missing file from last commitAlan Conway2007-06-261-0/+51
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550682 13f79535-47bb-0310-9956-ffa450edef68
* 2007-06-25 <aconway@redhat.com>Alan Conway2007-06-2625-100/+850
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cluster class implementing cluster membership map. * src/qpid/cluster/Cluster.cpp: Cluster membership implementation. * src/qpid/cluster/Cpg.cpp: Support for boost::function callbacks. * src/tests/Url.cpp: Implements AMQP-95 URL format. * xml/cluster.xml: Cluster join method. Build/packaging * README: Remove mention of openais till clustering is functional. For now it is optional and we depend on an unpackaged version. * configure.ac: Check openais has cpg_local_get(). * Makefile.am: Added cluster.xml to EXTRA_DIST. * src/generate.sh: add cluster.xml to codegen. * src/tests/Makefile.am: - Generate individual "sudo -u ais" wrappers for openais tests. - Drop "unit" directory, all unit tests in "tests" directory Minor changes: * src/qpid/sys/posix/Socket.cpp: * src/qpid/sys/posix/PosixAcceptor.cpp: * src/qpid/sys/posix/EventChannelAcceptor.cpp: * src/qpid/sys/apr/APRAcceptor.cpp: * src/qpid/sys/Acceptor.h (getHost): Added getHost() * src/tests/.valgrind.supp-default: Suppress benign valgrind warning in libcpg. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@550658 13f79535-47bb-0310-9956-ffa450edef68
* Dummy libcluster.so when openais is not available, keep rpmbuild happy.Alan Conway2007-06-202-4/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@549277 13f79535-47bb-0310-9956-ffa450edef68
* Intermediate checkin with preliminary work on epoll based net IOAndrew Stitcher2007-06-1822-364/+1609
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@548337 13f79535-47bb-0310-9956-ffa450edef68
* Parser for AMQP-95 URLsAlan Conway2007-06-155-0/+257
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547789 13f79535-47bb-0310-9956-ffa450edef68
* Minor update of log messages.Gordon Sim2007-06-151-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547726 13f79535-47bb-0310-9956-ffa450edef68
* Fixed catch clauses to catch by const & and use std::exception forAlan Conway2007-06-146-11/+11
| | | | | | | "generic" catches. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547241 13f79535-47bb-0310-9956-ffa450edef68
* Add ability for a queue to record all bindings to it, such that these can be ↵Gordon Sim2007-06-148-3/+176
| | | | | | | | | | removed when the queue is deleted. Fix to QPID-438 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547151 13f79535-47bb-0310-9956-ffa450edef68
* Removed unused files src/qpid/client/ClientAdapter.cpp and .h.Alan Conway2007-06-133-137/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@547016 13f79535-47bb-0310-9956-ffa450edef68
* Various minor fixes to build and test process:Gordon Sim2007-06-133-2/+3
| | | | | | | | | | | * cpp/src/tests/start_broker - removed use of the now invalid --ppid option * cpp/src/tests/Makefile.am - make running of ais tests dependent on inclusion of cluster * cpp/src/Makefile.am - added missing PrivatePosix.h file to dist * cpp/Makefile.am - added examples to list of sub dirs git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@546842 13f79535-47bb-0310-9956-ffa450edef68
* QPID-504: Print bound port if --port 0 is specified. Not yet used by tests.Alan Conway2007-06-115-148/+201
| | | | | | | | | | | | | | | | | * qpidd.cpp: - With --port 0 print the bound port number to stdout. - Removed --ppid, --check now prints pid. * Daemon.cpp/h: Move pid-file generation to caller (qpidd.cpp) * Exception.cpp: Log a debug message in exception constructors. Helps to show what exceptions were thrown even if they aren't logged at a higher level. * daemon_test: Test new daemon options. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@546180 13f79535-47bb-0310-9956-ffa450edef68
* Handler refactoring notes for cluster.Alan Conway2007-06-111-0/+161
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@546140 13f79535-47bb-0310-9956-ffa450edef68
* src/tests/Makefile.am: Fix typo in makefileAlan Conway2007-06-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@545570 13f79535-47bb-0310-9956-ffa450edef68
* Add missing scripts to EXTRA_DISTAlan Conway2007-06-081-2/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@545560 13f79535-47bb-0310-9956-ffa450edef68
* Timeout handling for dtx, plus tests.Gordon Sim2007-06-0817-60/+625
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@545531 13f79535-47bb-0310-9956-ffa450edef68