summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/Connection.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Changed u_int<n>_t to uint<n>_t for posix compliance.Alan Conway2007-03-151-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@518733 13f79535-47bb-0310-9956-ffa450edef68
* * gentools/templ.cpp/*Proxy*, CppGenerator.java: Changes to ProxyAlan Conway2007-02-131-20/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Handle invalid channels.Gordon Sim2007-02-091-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@505360 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/lib/common/framing/MethodContext.h: Reduced MethodContext toAlan Conway2007-02-021-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Changed methodBody in Methodcontext to be a shared_ptrAndrew Stitcher2007-02-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@502209 13f79535-47bb-0310-9956-ffa450edef68
* * cpp/lib/broker/Broker.cpp: Defer creation of acceptor till needed soAlan Conway2007-01-301-8/+9
| | | | | | | | | | InProcessBroker will not listen on any port. * cpp/lib/broker/BrokerAdapter,Connection.cpp,.h: Encapsulate public data members. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501638 13f79535-47bb-0310-9956-ffa450edef68
* Andrew Stitcher <astitcher@redhat.com>Alan Conway2007-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | r723@fuschia: andrew | 2007-01-12 00:35:16 +0000 Branch for my work on Qpid.0-9 r724@fuschia: andrew | 2007-01-12 00:59:28 +0000 Added in empty implementation of handler class for protocol Message class r768@fuschia: andrew | 2007-01-17 01:25:16 +0000 * Added Test for new MessageHandlerImpl (but no actual tests yet) * Filled in lots of the blanks in the MessageHandlerImpl with code stolen from the BasicHandlerImpl r800@fuschia: andrew | 2007-01-17 17:34:13 +0000 Updated to latest upstream changes r840@fuschia: andrew | 2007-01-19 00:31:59 +0000 Fixed merge errors r841@fuschia: andrew | 2007-01-19 00:47:29 +0000 Another merge problem fixed r878@fuschia: andrew | 2007-01-24 11:27:48 +0000 Started work on the Message class handler implementation r976@fuschia: andrew | 2007-01-30 17:05:05 +0000 Working again after broker Message refactor r980@fuschia: andrew | 2007-01-30 18:39:18 +0000 Fix for extra parameter to transfer git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@501534 13f79535-47bb-0310-9956-ffa450edef68
* * Added ClientAdapter - client side ChannelAdapter. Updated client side.Alan Conway2007-01-291-0/+1
| | | | | | | | | | | | | | | | * 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
* * Fixed request-response correlation on the broker.Alan Conway2007-01-221-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@498706 13f79535-47bb-0310-9956-ffa450edef68
* Last big refactoring for 0-9 framing. Still need additional tests &Alan Conway2007-01-191-8/+9
| | | | | | | | | | | | | | | | 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
* There are a ton of FIXMES and request/response IDs are not yet working fullyAlan Conway2007-01-181-115/+20
| | | | | | | | | | | | | | | | | | | | | but all tests are passing. * broker::Broker: Removed requester/responder from broker. * framing::BodyHandler: added Requester/Responder to BodyHandler, becomes the base class for channel adapters in broker and client. * broker::BrokerAdapter: Inherit BodyHandler, wraps a broker::Channel. Hide private *HandlerImpl detail classes in BodyHandler.cpp. * broker::Connection: Requester/Responder/Adapter now per-channel. Connection channel map replaced with adapter map of BrokerAdapters. handle* functions moved to BrokerAdapter. All methods now handled by a BrokerAdapter for the relevant channel. ChannelHandlerImpl is repsonsible for checking that - No method on a non-0 channel is processed before open() - Channel 0 methods only happen on channel 0 and similar for non-zero methods Checks are not yet complete (see FIXMES) * client::ResponseHandler: fix for client hang if broker crashs. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@497319 13f79535-47bb-0310-9956-ffa450edef68
* Separated adapter code from Connection class: Extracted allAlan Conway2007-01-171-535/+55
| | | | | | | | | | | HandlerImpl classes to BrokerAdapter. The Connection is now part of the version-invariant core, all version-dependent code is in BrokerAdapter. The extraction exposes some ugly dependencies between adapter, Connection and parts of the Broker. More refactoring to follow to improve encapsulation. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@496926 13f79535-47bb-0310-9956-ffa450edef68
* * Renamed Session* classes to Connection* to align with AMQP specAlan Conway2007-01-161-0/+700
- broker::SessionHandlerImpl -> broker::Connection - broker::SessionHandlerImplFactory -> broker::ConnectionFactory - sys::SessionHandler -> ConnectionInputHandler - sys::SessionHandlerFactory -> ConnectionInputHandlerFactory git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@496848 13f79535-47bb-0310-9956-ffa450edef68