diff options
| author | Alan Conway <aconway@apache.org> | 2007-01-19 21:33:27 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-01-19 21:33:27 +0000 |
| commit | e861284318186f8d9cd64a7ddcc28b8d20b98721 (patch) | |
| tree | 6dac612d65297dc5f104350884fc01385c69ecda /cpp/lib/broker/Connection.cpp | |
| parent | 226be67c91b25a5ba8efdd9ba88566033ec97718 (diff) | |
| download | qpid-python-e861284318186f8d9cd64a7ddcc28b8d20b98721.tar.gz | |
Last big refactoring for 0-9 framing. Still need additional tests &
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
Diffstat (limited to 'cpp/lib/broker/Connection.cpp')
| -rw-r--r-- | cpp/lib/broker/Connection.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/cpp/lib/broker/Connection.cpp b/cpp/lib/broker/Connection.cpp index 3db5bcd074..dc8bdeda05 100644 --- a/cpp/lib/broker/Connection.cpp +++ b/cpp/lib/broker/Connection.cpp @@ -31,12 +31,12 @@ using namespace qpid::sys; namespace qpid { namespace broker { -Connection::Connection(SessionContext* context_, Broker& broker_) : - context(context_), +Connection::Connection(ConnectionOutputHandler* out_, Broker& broker_) : framemax(65536), heartbeat(0), broker(broker_), - settings(broker.getTimeout(), broker.getStagingThreshold()) + settings(broker.getTimeout(), broker.getStagingThreshold()), + out(out_) {} Queue::shared_ptr Connection::getQueue(const string& name, u_int16_t channel){ @@ -68,14 +68,15 @@ void Connection::initiated(qpid::framing::ProtocolInitiation* header) { // TODO aconway 2007-01-16: correct error code. throw ConnectionException(0, "Connection initiated twice"); client.reset(new qpid::framing::AMQP_ClientProxy( - context, header->getMajor(), header->getMinor())); + out, header->getMajor(), header->getMinor())); FieldTable properties; string mechanisms("PLAIN"); string locales("en_US"); - // TODO aconway 2007-01-16: Move to adapter. + // TODO aconway 2007-01-16: Client call, move to adapter. client->getConnection().start( - 0, header->getMajor(), header->getMinor(), properties, - mechanisms, locales); + MethodContext(0, out), + header->getMajor(), header->getMinor(), + properties, mechanisms, locales); } void Connection::idleOut(){} @@ -105,7 +106,7 @@ BrokerAdapter& Connection::getAdapter(u_int16_t id) { AdapterMap::iterator i = adapters.find(id); if (i == adapters.end()) { Channel* ch=new Channel( - client->getProtocolVersion(), context, id, + client->getProtocolVersion(), out, id, framemax, broker.getQueues().getStore(), settings.stagingThreshold); BrokerAdapter* adapter = new BrokerAdapter(ch, *this, broker); |
