summaryrefslogtreecommitdiff
path: root/cpp/lib/client/ClientChannel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Changed u_int<n>_t to uint<n>_t for posix compliance.Alan Conway2007-03-151-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@518733 13f79535-47bb-0310-9956-ffa450edef68
* Merged revisions 507582 via svnmerge from Alan Conway2007-03-141-1/+1
| | | | | | | | | | | | | https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid ........ r507582 | gsim | 2007-02-14 10:38:57 -0500 (Wed, 14 Feb 2007) | 3 lines Add durability property to queues and pass this to broker on declare. ........ git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@518246 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/lib/client/Basic.*, ClientChannel.*: Extracted Basic functionalityAlan Conway2007-02-221-221/+43
| | | | | | | | from Channel into separate Basic class. * cpp/lib/client/*, cpp/test/*: Adjusted for new Channel::getBasic() API. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@510705 13f79535-47bb-0310-9956-ffa450edef68
* Thread safety fixes for race conditions on incoming messages.Alan Conway2007-02-211-172/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cpp/lib/client/MessageListener.h: const correctness. * cpp/tests/*: MessageListener const change. * cpp/lib/broker/Content.h: Removed out-of-date FIXME comments. * cpp/lib/client/ClientChannel.h/ .cpp(): - added locking for consumers map and other member access. - refactored implementations of Basic get, deliver, return: most logic now encapsulted in IncomingMessage class. - fix channel close problems. * cpp/lib/client/ClientMessage.h/.cpp: - const correctness & API convenience fixes. - getMethod/setMethod/getHeader: for new IncomingMessage * cpp/lib/client/Connection.h/.cpp: - Fixes to channel closure. * cpp/lib/client/IncomingMessage.h/.cpp: - Encapsulate *all* incoming message handling for client. - Moved handling of BasicGetOk to IncomingMessage to fix race. - Thread safety fixes. * cpp/lib/client/ResponseHandler.h/.cpp: - added getResponse for ClientChannel. * cpp/lib/common/Exception.h: - added missing throwSelf implementations. - added ShutdownException as general purpose shut-down indicator. - added EmptyException as general purpose "empty" indicator. * cpp/lib/common/sys/Condition|Monitor|Mutex.h|.cpp: - Condition variable abstraction extracted from Monitor for situations where a single lock is associated with multiple conditions. * cpp/tests/ClientChannelTest.cpp: - Test incoming message transfer, get, consume etc. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@510161 13f79535-47bb-0310-9956-ffa450edef68
* ClientChannel: removed server proxy, not used.Alan Conway2007-02-171-10/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@508706 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/lib/client/ClientMessage.h/.cpp: Added Message constructor taking data.Alan Conway2007-02-171-2/+2
| | | | | | | | | | | | | | | | | * cpp/lib/client/IncomingMessage.cpp: Simplified message aggregation. * cpp/lib/common/framing/AMQ*Body.h: remove unnecessary virtual inheritance. * cpp/lib/common/framing/AMQMethodBody.h: add bool isRequest, isResponse * cpp/lib/common/sys/Mutex.h (class ScopedUnlock): Added ScopedUnlock * cpp/lib/common/sys/ThreadSafeQueue.h: Thread-safe queue template. * cpp/tests/BrokerChannelTest.cpp: Renamed from ChannelTest. * cpp/tests/ClientChannelTest.cpp: Test client API. * cpp/tests/RequestResponseTest.cpp: Removed empty test. * cpp/lib/client/Connection.h,.cpp: - non-static channelIdCounter - No close() in dtor. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@508705 13f79535-47bb-0310-9956-ffa450edef68
* Added durability property to queues and pass this to broker on declare. ↵Gordon Sim2007-02-141-1/+1
| | | | | | | | | | (This change also applied on trunk) Minor update of accumulated ack and test. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@507622 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/lib/common/sys/ProducerConsumer.h:Alan Conway2007-02-141-6/+0
| | | | | | | | | | | | | | | General-purpose producer-consumer synchronization. Anywhere we have producer/consumer threads in qpid we should re-use this sync object rather than re-inventing the synchronization each time. * cpp/lib/common/sys/AtomicCount.h: Separated ScopedIncrement/ScopedDecrement into ScopedIncrement.h * cpp/tests/InProcessBroker.h: Added class InProcessBrokerClient, a self contained in-process client + broker convenience for tests. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@507560 13f79535-47bb-0310-9956-ffa450edef68
* * gentools/templ.cpp/*Proxy*, CppGenerator.java: Changes to ProxyAlan Conway2007-02-131-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | classes to make them directly usable as an API for low-level AMQP access. - Proxies hold reference to a ChannelAdapter not just an output handler. - Removed MethodContext parameter, makes no sense on requester end. - Return RequestId from request methods so caller can correlate incoming responses. - Add RequestId parameter to response methods so caller can provide correlation for outgoing responses. - No longer inherit from *Operations classes as the signatures no longer match. Proxy is for caller (client/requester) and Operations is for callee (server/responder) * cpp/lib/client/ClientChannel.h: Channel provides a raw proxy to the broker. Normal users will still use the Channel API to deal with the broker, but advanced users (incl ourselves!) can use the raw API to directly send and receive any AMQP message. * cpp/lib/broker/BrokerChannel,BrokerAdapter: Refactor for new proxies. broker::Channel is also a ClientProxy * Sundry files: - Pass ProtcolVersion by value, it is only two bytes. - Misc. const correctness fixes. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@506823 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/lib/common/framing/MethodContext.h: Reduced MethodContext toAlan Conway2007-02-021-16/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ChannelAdapter and Method Body. Request ID comes from body, ChannelAdapter is used to send frames, not OutputHandler. * cpp/lib/common/framing/ChannelAdapter.h,.cpp: Removed context member. Context is per-method not per-channel. * cpp/lib/broker/*: Replace direct use of OutputHandler and ChannelId with MethodContext (for responses) or ChannelAdapter (for requests.) Use context request-ID to construct responses, send all bodies via ChannelAdapter. * cpp/lib/broker/BrokerAdapter.cpp: Link broker::Channel to BrokerAdapter. * cpp/lib/broker/*: Remove unnecessary ProtocolVersion parameters. Fix bogus signatures: ProtocolVersion* -> const ProtocolVersion& * Cosmetic changes, many files: - fixed indentation, broke long lines. - removed unnecessary qpid:: prefixes. * broker/BrokerAdapter,BrokerChannel: Merged BrokerAdapter into broker::channel. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@502767 13f79535-47bb-0310-9956-ffa450edef68
* * client/* framing/*: fixed client-side request ID processing.Alan Conway2007-01-301-20/+19
| | | | | | | | | | | | | | * cpp/tests/InProcessBroker.h: For tests: connect to an in-process broker directly, bypass the network. Keeps log of client/broker conversation for verification in test code. * cpp/tests/FramingTest.cpp (testRequestResponseRoundtrip): Client/broker round-trip test for request/reponse IDs and response mark. * APRAcceptor.cpp (APRAcceptor): fixed valgrind uninitialized error. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501502 13f79535-47bb-0310-9956-ffa450edef68
* * Added ClientAdapter - client side ChannelAdapter. Updated client side.Alan Conway2007-01-291-162/+246
| | | | | | | | | | | | | | | | * Moved ChannelAdapter initialization from ctor to init(), updated broker side. * Improved various exception messages with boost::format messages. * Removed unnecssary virtual inheritance. * Widespread: fixed incorrect non-const ProtocolVersion& parameters. * Client API: pass channels by reference, not pointer. * codegen: - MethodBodyClass.h.templ: Added CLASS_ID, METHOD_ID and isA() template. - Various: fixed non-const ProtocolVersion& parameters. * cpp/bootstrap: Allow config arguments with -build. * cpp/gen/Makefile.am: Merged codegen fixes from trunk. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501087 13f79535-47bb-0310-9956-ffa450edef68
* Last big refactoring for 0-9 framing. Still need additional tests &Alan Conway2007-01-191-0/+10
| | | | | | | | | | | | | | | | debugging but the overall structure is all in place. * configure.ac: Added -Wno_virtual_overload warning * ChannelTest.cpp, MessageBuilderTest.cpp: Fixed virtual overload warnings. * ChannelAdapter.cpp: Common base for client/broker adapters. Creates invocation context, handles request/resposne IDs. * CppGenerator.java: - Proxies send methods using MethodContext. * Various .h files: removed unnecessary #includes, added to requred .cpp files. * ConnectionContext: renamed from SessionContext. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497963 13f79535-47bb-0310-9956-ffa450edef68
* In case any channel is waiting for a response on termination of the ↵Gordon Sim2007-01-181-0/+1
| | | | | | connection, notify the response handler. (Fix to QPID-303). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497473 13f79535-47bb-0310-9956-ffa450edef68
* Use amqp 0-9 request/response framing in broker and client.Alan Conway2007-01-121-3/+3
| | | | | | | | | | Updated: framing, client, broker, generated code. The new request/response data (request-id etc.) is not yet being used, we are simply running the old Basic protocol over request/response frames. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@495679 13f79535-47bb-0310-9956-ffa450edef68
* version back merge from trunk rev 494553.Carl C. Trieloff2007-01-091-19/+19
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@494559 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/gen/Makefile.am: fixed generated code dependencies.Alan Conway2006-12-191-4/+10
| | | | | | | | * *Channel,SessionHandlerImpl,FramingTest: added FieldTable argument to consume() to conform to updated XML. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@488745 13f79535-47bb-0310-9956-ffa450edef68
* 2006-12-01 Jim Meyering <meyering@redhat.com>Alan Conway2006-12-011-0/+428
This delta imposes two major changes on the C++ hierarchy: - adds autoconf, automake, libtool support - makes the hierarchy flatter and renames a few files (e.g., Queue.h, Queue.cpp) that appeared twice, once under client/ and again under broker/. In the process, I've changed many #include directives, mostly to remove a qpid/ or qpid/framing/ prefix from the file name argument. Although most changes were to .cpp and .h files under qpid/cpp/, there were also several to template files under qpid/gentools, and even one to CppGenerator.java. Nearly all files are moved to a new position in the hierarchy. The new hierarchy looks like this: src # this is the new home of qpidd.cpp tests # all tests are here. See Makefile.am. gen # As before, all generated files go here. lib # This is just a container for the 3 lib dirs: lib/client lib/broker lib/common lib/common/framing lib/common/sys lib/common/sys/posix lib/common/sys/apr build-aux m4 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@481159 13f79535-47bb-0310-9956-ffa450edef68