diff options
| author | Alan Conway <aconway@apache.org> | 2007-08-29 23:27:40 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-08-29 23:27:40 +0000 |
| commit | e183227707d150b1f42e750df0e90cd7dac8744e (patch) | |
| tree | a9156083c1890852c2d4013d4a856f9f28762946 /cpp/src/qpid/broker/SessionAdapter.cpp | |
| parent | 7422e57391a89bc2493cba18ca2ef0a84fec7baa (diff) | |
| download | qpid-python-e183227707d150b1f42e750df0e90cd7dac8744e.tar.gz | |
* src/qpid/broker/Session.h, .cpp: Session holds all state of a session 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
Diffstat (limited to 'cpp/src/qpid/broker/SessionAdapter.cpp')
| -rw-r--r-- | cpp/src/qpid/broker/SessionAdapter.cpp | 69 |
1 files changed, 11 insertions, 58 deletions
diff --git a/cpp/src/qpid/broker/SessionAdapter.cpp b/cpp/src/qpid/broker/SessionAdapter.cpp index 2c471ff098..44245f9689 100644 --- a/cpp/src/qpid/broker/SessionAdapter.cpp +++ b/cpp/src/qpid/broker/SessionAdapter.cpp @@ -24,69 +24,22 @@ namespace qpid { namespace broker { using namespace framing; -SessionAdapter::~SessionAdapter() { +SessionAdapter::SessionAdapter(Connection& c, ChannelId ch) + : connection(c), channel(ch) +{ + // FIXME aconway 2007-08-29: When we handle session commands, + // do this on open. + session.reset(new Session(*this, 0)); } -SessionAdapter::SessionAdapter() { - // FIXME aconway 2007-08-27: Implement -} - -void SessionAdapter::visit(const SessionOpenBody&) { - // FIXME aconway 2007-08-27: Implement -} - -void SessionAdapter::visit(const SessionAckBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionAttachedBody&) { - // FIXME aconway 2007-08-27: Implement -} +SessionAdapter::~SessionAdapter() {} -void SessionAdapter::visit(const SessionCloseBody&) { - // FIXME aconway 2007-08-27: Implement +void SessionAdapter::handle(AMQFrame& f) { + // FIXME aconway 2007-08-29: handle session commands here, forward + // other frames. + session->in(f); } -void SessionAdapter::visit(const SessionClosedBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionDetachedBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionFlowBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionFlowOkBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionHighWaterMarkBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionResumeBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionSolicitAckBody&) { - // FIXME aconway 2007-08-27: Implement -} - - -void SessionAdapter::visit(const SessionSuspendBody&) { - // FIXME aconway 2007-08-27: Implement -} - }} // namespace qpid::broker |
