diff options
| author | Alan Conway <aconway@apache.org> | 2007-09-19 22:34:11 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-09-19 22:34:11 +0000 |
| commit | 7ac52b8288273de98f3e97ee8e34776a61034bfc (patch) | |
| tree | e0a180875e3d097fabcb9b01d543a9d65f4f5cc2 /cpp/src/qpid/broker/SessionHandler.h | |
| parent | 9759046f7a53c88d17355d75d9ca7cc38ec35657 (diff) | |
| download | qpid-python-7ac52b8288273de98f3e97ee8e34776a61034bfc.tar.gz | |
AMQP 0-10 Session suppported on broker and client.
Client always uses session on the wire but client::Channel API is
still available until all C++ tests are migrated.
Broker allows both session and channel connection to support python
tests.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@577459 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/SessionHandler.h')
| -rw-r--r-- | cpp/src/qpid/broker/SessionHandler.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/cpp/src/qpid/broker/SessionHandler.h b/cpp/src/qpid/broker/SessionHandler.h index 219cd01396..5962ab77a8 100644 --- a/cpp/src/qpid/broker/SessionHandler.h +++ b/cpp/src/qpid/broker/SessionHandler.h @@ -1,5 +1,5 @@ -#ifndef QPID_BROKER_SESSIONADAPTER_H -#define QPID_BROKER_SESSIONADAPTER_H +#ifndef QPID_BROKER_SESSIONHANDLER_H +#define QPID_BROKER_SESSIONHANDLER_H /* * @@ -40,7 +40,8 @@ class Session; * * SessionHandlers can be stored in a map by value. */ -class SessionHandler : public framing::FrameHandler::InOutHandler +class SessionHandler : public framing::FrameHandler::InOutHandler, + private framing::AMQP_ServerOperations::SessionHandler { public: SessionHandler(Connection&, framing::ChannelId); @@ -63,7 +64,7 @@ class SessionHandler : public framing::FrameHandler::InOutHandler void handleOut(framing::AMQFrame&); private: - // FIXME aconway 2007-08-31: Move to session methods. + // FIXME aconway 2007-08-31: Drop channel. struct ChannelMethods : public framing::AMQP_ServerOperations::ChannelHandler { SessionHandler& parent; @@ -81,7 +82,21 @@ class SessionHandler : public framing::FrameHandler::InOutHandler void closeOk(); }; friend class ChannelMethods; - + + /// Session methods + void open(uint32_t detachedLifetime); + void flow(bool active); + void flowOk(bool active); + void close(); + void closed(uint16_t replyCode, const std::string& replyText); + void resume(const framing::Uuid& sessionId); + void suspend(); + void ack(uint32_t cumulativeSeenMark, + const framing::SequenceNumberSet& seenFrameSet); + void highWaterMark(uint32_t lastSentMark); + void solicitAck(); + + void assertOpen(const char* method); void assertClosed(const char* method); @@ -91,8 +106,11 @@ class SessionHandler : public framing::FrameHandler::InOutHandler shared_ptr<Session> session; bool ignoring; ChannelMethods channelHandler; + bool useChannelClose; // FIXME aconway 2007-09-19: remove with channel. }; }} // namespace qpid::broker -#endif /*!QPID_BROKER_SESSIONADAPTER_H*/ + + +#endif /*!QPID_BROKER_SESSIONHANDLER_H*/ |
