summaryrefslogtreecommitdiff
path: root/cpp/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix for QPID-561Gordon Sim2007-09-032-11/+3
| | | | | | | | Renabled MessageBuilderTest git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@572264 13f79535-47bb-0310-9956-ffa450edef68
* Removed BrokerChannel.cpp, .h: replaced by Session.cpp, .hAlan Conway2007-08-312-705/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571577 13f79535-47bb-0310-9956-ffa450edef68
* * Summary:Alan Conway2007-08-3125-425/+1114
| | | | | | | | | | | | | | | | | | | | | | | | | | - Moved BrokerChannel functionality into Session. - Moved ChannelHandler methods handling into SessionAdapter. - Updated all handlers to use session. (We're still using AMQP channel methods in SessionAdapter) Roles & responsibilities: Session: - represents an _open_ session, may be active or suspended. - ows all session state including handler chains. - attahced to SessionAdapter when active, not when suspended. SessionAdapter: - reprents the association of a channel with a session. - owned by Connection, kept in the session map. - channel open == SessionAdapter.getSessio() != 0 Anything that depends on attachment to a channel, connection or protocol should be in SessionAdpater. Anything that suvives a session suspend belongs in Session. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571575 13f79535-47bb-0310-9956-ffa450edef68
* * Changes to make C++ client code use the asynchronous network IOAndrew Stitcher2007-08-3115-193/+309
| | | | | | | | * Fixed up the test for buffer changes * Removed unused buffer operations git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571529 13f79535-47bb-0310-9956-ffa450edef68
* Pass QueuedMessage to queues consumers. This records the position of that ↵Gordon Sim2007-08-3111-79/+96
| | | | | | message in the queue which is need to handle rlease and acquire. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571518 13f79535-47bb-0310-9956-ffa450edef68
* Fixed bug where stale iterator is used.Gordon Sim2007-08-311-4/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571410 13f79535-47bb-0310-9956-ffa450edef68
* - Update cluster code to work with new FrameHandlerAlan Conway2007-08-3013-148/+136
| | | | | | | | - Update ClassifierHandler to use Visitor rather than map. - Replace heap allocation in cluster classes with boost::optional. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571246 13f79535-47bb-0310-9956-ffa450edef68
* * configure.ac: Disabled cluster build temporarily while fixing build problems.Alan Conway2007-08-301-1/+1
| | | | | | | * src/qpid/framing/Handler.h: Add missing default constructor. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@571161 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/broker/Session.h, .cpp: Session holds all state of a session ↵Alan Conway2007-08-2917-199/+294
| | | | | | | | | | | | | | | | | | | | | | | including handlers created for that session. Session is not directly associated with a channel. * src/qpid/broker/SessionAdapter.h, .cpp: SessionAdapter is bound to a channel managed by the Connection. It can be attached to and detatched from a Session. * src/qpid/broker/Connection.cpp, .h: Use SessionAdapter. * src/qpid/framing/Handler.h: Removed use of shared_ptr. Handlers belong either to a Session or a Connection and are destroyed with it. * src/qpid/framing/InputHandler.h, OutputHandler.h: Both now inherit from FrameHandler and can be used as FrameHandlers. Intermediate step to removing them entirely. * src/qpid/broker/ConnectionAdapter.h: * src/qpid/client/ConnectionHandler.h: * src/qpid/framing/ChannelAdapter.cpp, .h: Minor changes required by Handler changes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570982 13f79535-47bb-0310-9956-ffa450edef68
* Updated message.transfer encoding to use header and content segments ↵Gordon Sim2007-08-2898-2621/+1840
| | | | | | | | | | (including new structs). Unified more between the basic and message classes messages. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570538 13f79535-47bb-0310-9956-ffa450edef68
* * Fix compile errors.Alan Conway2007-08-273-4/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570252 13f79535-47bb-0310-9956-ffa450edef68
* * Fix compile errors.Alan Conway2007-08-273-26/+31
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570251 13f79535-47bb-0310-9956-ffa450edef68
* - perf clean up.Carl C. Trieloff2007-08-272-10/+9
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570243 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/framing/FrameDefaultVisitor.h:Alan Conway2007-08-277-31/+215
| | | | | | | | | | | | | | | A visitor for all concrete frame body types. * src/qpid/broker/SessionState.h: 3 states - closed, active, suspended. * src/qpid/broker/SessionAdapter.h, .cpp: Session handler, implements session class commands. In progres.. * rubygen/templates/MethodBodyDefaultVisitor.rb: A visitor for all method body types. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570236 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/broker/SessionState.h: State of a session.Alan Conway2007-08-276-0/+242
| | | | | | | | * src/qpid/broker/SuspendedSessions.h, .cpp: Stores suspended sessions. * src/tests/Session.cpp: Test session classes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570164 13f79535-47bb-0310-9956-ffa450edef68
* - cache the exchange on a given ChannelCarl C. Trieloff2007-08-272-5/+20
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570152 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/framing/FrameDefaultVisitor.h:Alan Conway2007-08-271-0/+56
| | | | | | | | | | | | | | Visitor for all concrete frame body types. Override to handle specific bodies (methods or header/content) and provide default handling for others. * rubygen/MethodBodyDefaultVisitor.rb: Visitor for MethodBodies with visit functions that call virtual defaultVisit(). Override to handle specific methods and give default behavior for others. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570121 13f79535-47bb-0310-9956-ffa450edef68
* * rubygen/amqpgen.rb: Performance and API improvements.Alan Conway2007-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added nodes for all amqp.xml elements except doc, assert and rule. (They can easily be added.) In particular AmqpDomain is a proper node, providing a place to do type mapping. Every node has reader methods for AMQP attributes/elements: - attr() for each AMQP attribute "attr" returns the string value. - foos() returns AmqpElements for all the "foo" children. - foo(name) returns AmqpElements for the named "foo" child domain() returns an AmqpDomain rather than the string name. Method names that would clash with Object methods get a trailing "_" So: class_/classes, method_/methods_, type_/types Notes: - no amqp_ prefixes. - AmqpElement does not inherit REXML::Element, AmqpElement#xml() to get the REXML element. Performance: all templates run in 2.8 seconds on my laptop, compared to almost two minutes previously. Main change was to replace xpath searches with simple descent of the Amqp model and cache values selectively based on profiling. * rubygen/cppgen.rb: - Updated for amqpgen changes. - Introduced CppType to manage C++ type information - Moved all type mapping to CppType/AmqpDomain Some templates still do their own type calculations, these should be centralized in CppType so they can be re-used. * rubygen/templates/*: Updated for new API * src/qpid/framing/amqp_types_full.h: Added Uuid.h * xml/cluster.xml: change "type" attribute to "domain" git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@570096 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/broker/Daemon.cpp: Additional logging.Alan Conway2007-08-243-29/+42
| | | | | | | | | * configure.ac: Fixed problem with openais check. * src/tests/test_env: Remove LD_PRELOAD dlclose_noop, only for CppUnit. * src/tests/run-unit-tests: Added LD_PRELOAD dlclose_noop. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@569520 13f79535-47bb-0310-9956-ffa450edef68
* removed un-used codeCarl C. Trieloff2007-08-232-7/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@569136 13f79535-47bb-0310-9956-ffa450edef68
* * specs/amqp-transitional.0-10.xml: Removed ping and pong methods.Alan Conway2007-08-222-12/+12
| | | | | | | | | | They have been removed from the spec. * cpp/src/tests/Cluster.cpp, Cluster_child.cpp: Removed use of SessionPing/PongBody. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568732 13f79535-47bb-0310-9956-ffa450edef68
* Reapply rev 568249 with the changes made to the generator this time, rather ↵Gordon Sim2007-08-222-2/+17
| | | | | | than the generated file itself. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568517 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/sys/Serializer.h, .cpp:Alan Conway2007-08-215-102/+128
| | | | | | | | | | | Template Serializer on functor for execute(). Old Serializer equivalent to Serializer<boost::function<void()> > * src/qpid/broker/BrokerQueue.h, .cpp: Use hand-written functor for Serializer instead of boost::function. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568332 13f79535-47bb-0310-9956-ffa450edef68
* Undo revision 568249, causing tests to hang.Alan Conway2007-08-212-17/+2
| | | | | | | | | | | | | ------------------------------------------------------------------------ r568249 | gsim | 2007-08-21 16:11:20 -0400 (Tue, 21 Aug 2007) | 3 lines Invocation now uses the visitor mechanism ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568298 13f79535-47bb-0310-9956-ffa450edef68
* Invocation now uses the visitor mechanismGordon Sim2007-08-212-2/+17
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568249 13f79535-47bb-0310-9956-ffa450edef68
* - header correction for bufferCarl C. Trieloff2007-08-214-1/+55
| | | | | | | | | - added tests for one msg to multiple queue in async mode - added counter for async multiple msg git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568236 13f79535-47bb-0310-9956-ffa450edef68
* Don't add the generated files to nobase_include_HEADERS they are already in ↵Gordon Sim2007-08-211-1/+0
| | | | | | EXTRA_DIST git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568221 13f79535-47bb-0310-9956-ffa450edef68
* updated rule to reflect new location for generated fileGordon Sim2007-08-211-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568190 13f79535-47bb-0310-9956-ffa450edef68
* Refresh of transitional xml to more closely reflect latest specificationGordon Sim2007-08-2121-155/+312
| | | | | | | | | Initial execution-result support (not yet handled on c++ client) Generation is now all done through the ruby code (it is a little slower at present I'm afraid, will try to speed it up over the next weeks) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@568174 13f79535-47bb-0310-9956-ffa450edef68
* Fixed Blob bug causing test crashes/hangs.Alan Conway2007-08-207-30/+171
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567755 13f79535-47bb-0310-9956-ffa450edef68
* Undo over-hasty commitAlan Conway2007-08-201-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567701 13f79535-47bb-0310-9956-ffa450edef68
* get() returns 0 if Blob is empty.Alan Conway2007-08-201-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567698 13f79535-47bb-0310-9956-ffa450edef68
* If neither --listen nor --publish is specified, do both.Alan Conway2007-08-201-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567696 13f79535-47bb-0310-9956-ffa450edef68
* r1036@fuschia: andrew | 2007-08-20 01:41:12 +0100Andrew Stitcher2007-08-202-2/+2
| | | | | | | Small fixes to allow code to compile git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567515 13f79535-47bb-0310-9956-ffa450edef68
* * src/qpid/framing/MethodHolder.hAlan Conway2007-08-185-16/+31
| | | | | | | | | | | | | * src/qpid/framing/Blob.h - add empty() test - get() returns 0 when empty * src/qpid/client/Response.h: assert checks. * src/tests/perftest.cpp: default to listen and publish. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567221 13f79535-47bb-0310-9956-ffa450edef68
* Fix memory leak in client_test, caused by bug in Blob.h.Alan Conway2007-08-172-10/+13
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567129 13f79535-47bb-0310-9956-ffa450edef68
* - few more clean-ups for async message store.Carl C. Trieloff2007-08-173-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567119 13f79535-47bb-0310-9956-ffa450edef68
* Fix cluster code for heap reuduction commit.Alan Conway2007-08-173-2/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567109 13f79535-47bb-0310-9956-ffa450edef68
* * Fixes for code generation.Alan Conway2007-08-172-39/+15
| | | | | | | | | | - Generate make fragments in $(srcdir) to fix VPATH builds. - rubygen: generates its own .mk fragment - rubygen: moved template info from Makefile.am to generated rubygen.mk, fixes circular dependency between Makefile and rubygen.mk - removed unused templates. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567072 13f79535-47bb-0310-9956-ffa450edef68
* fix for new heap modelCarl C. Trieloff2007-08-171-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567061 13f79535-47bb-0310-9956-ffa450edef68
* - corrected getMessageCount() for async messagesCarl C. Trieloff2007-08-172-1/+24
| | | | | | | | - added test for async message count. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@567059 13f79535-47bb-0310-9956-ffa450edef68
* - Fix for asyncIO for storeCarl C. Trieloff2007-08-163-5/+18
| | | | | | | | | | | | | | | | | | - Fix for dtx async IO recover - Temp patch for Tx commit ( existing bug uncovered ) - All store tests should be working again Know issues: - If a msg is sent to more than one queue, then the io complete is signaled on the first record written, not the last - Open issues for tx begin then commit with no prepare using duarble msgs and async IO. async complete bit not set on recovery. will be fixed with next commit. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566846 13f79535-47bb-0310-9956-ffa450edef68
* AMQBodies are no longer allocated on the heap and passed with shared_ptr.Alan Conway2007-08-1684-1088/+824
| | | | | | | | | | | | | | | | | | | | | | | | | | AMQFrame contains a boost::variant of AMQHeaderBody,AMQContentBody, AMQHeatbeatBody, and MethodHolder. A variant is basically a type-safe union, it can allocate any of the types in-place. MethodHolder contains a Blob, a less sophisticated kind of variant, which can contain any of the concrete method body types. Using variants for all the method types causes outrageous compile times and bloated library symbol names. Blob lacks some of the finer features of variant and needs help from generated code. For now both are hidden to the rest of the code base behind AMQFrame and MethodBody classes so if/when we decide to settle on just one "variant" type solution we can do so. This commit touches nearly 100 files, mostly converting method signatures with shared_ptr<FooBody> to FooBody* or FooBody&, and converting stored shared_ptr<AMQBody> to AMQFrame and share_ptr<AMQMethodBody> to MethodHolder. There is one outstanding client memory leak, which I will fix in my next commit. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566822 13f79535-47bb-0310-9956-ffa450edef68
* Minor cleanup.Gordon Sim2007-08-161-1/+0
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566601 13f79535-47bb-0310-9956-ffa450edef68
* Bug fix for client shutdown.Gordon Sim2007-08-161-15/+14
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566527 13f79535-47bb-0310-9956-ffa450edef68
* - async message fix in dequeueCarl C. Trieloff2007-08-152-1/+27
| | | | | | | | - addition of test for async enqueue of messages on BrokerQueue git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566306 13f79535-47bb-0310-9956-ffa450edef68
* async IO for broker storeCarl C. Trieloff2007-08-1510-12/+122
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566289 13f79535-47bb-0310-9956-ffa450edef68
* Altered old client channel to use new generated session interface (primarily ↵Gordon Sim2007-08-154-112/+46
| | | | | | to reduce the number of places where method bodies are constructed). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566274 13f79535-47bb-0310-9956-ffa450edef68
* * perftest/topic_publisher.cpp, topic_listener.cpp:Alan Conway2007-08-153-0/+312
| | | | | | | | | | | | Combined into a single preftest.cpp executable and moved to src/tests. New perftest: - Supports all client-side options (--host, --port etc.) - Can be run as producer (--listen), consumer (--publish) or both. - --count specifies number of messages (default 500000 as before) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566211 13f79535-47bb-0310-9956-ffa450edef68
* Add missing files to source lists for distcheck.Alan Conway2007-08-151-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@566119 13f79535-47bb-0310-9956-ffa450edef68