summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/ChannelAdapter.h
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-07-17 08:28:48 +0000
committerGordon Sim <gsim@apache.org>2007-07-17 08:28:48 +0000
commitce9743f8f1640d42af5fe7aaa8fe7e3ca82a914d (patch)
treeea71b96a92eb5402b71a4c08312fbe1d8b835bbc /cpp/src/qpid/framing/ChannelAdapter.h
parent54b8fe305e87f623bbeb2c50bea20a332f71a983 (diff)
downloadqpid-python-ce9743f8f1640d42af5fe7aaa8fe7e3ca82a914d.tar.gz
Some refactoring towards a more decoupled handler chain structure:
* Connection no longer depends on Channel; it contains a map of FrameHandler::Chains. (The construction of the chains still refers to specific handlers). * Channel is no longer tied to ChannelAdapter through inheritance. The former is independent of any particular handler chain or protocol version, the latter is still used by ConnectionAdapter and SemanticHandler in the 0-9 chain. * A DeliveryAdapter interface has been introduced as part of the separation of ChannelAdapter from Channel. This is intended to adapt from a version independent core to version specific mechanisms for sending messages. i.e. it fulfills the same role for outputs that e.g. BrokerAdapter does for inputs. (Its not perfect yet by any means but is a step on the way to the correct model I think). * The connection related methods sent over channel zero are implemented in their own adapter (ConnectionAdapter), and are entirely separate from the semantic layer. The channel control methods are still bundled with the proper semantic layer methods; they too can be separated but would have to share the request id with the semantic method handler due to the nature of the 0-9 WIP. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@556846 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/ChannelAdapter.h')
-rw-r--r--cpp/src/qpid/framing/ChannelAdapter.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/qpid/framing/ChannelAdapter.h b/cpp/src/qpid/framing/ChannelAdapter.h
index 5f92383ee3..1c3f29d762 100644
--- a/cpp/src/qpid/framing/ChannelAdapter.h
+++ b/cpp/src/qpid/framing/ChannelAdapter.h
@@ -52,7 +52,7 @@ class MethodContext;
* Thread safety: OBJECT UNSAFE. Instances must not be called
* concurrently. AMQP defines channels to be serialized.
*/
-class ChannelAdapter : private BodyHandler {
+class ChannelAdapter : protected BodyHandler {
public:
/**
*@param output Processed frames are forwarded to this handler.
@@ -84,6 +84,10 @@ class ChannelAdapter : private BodyHandler {
virtual bool isOpen() const = 0;
+ RequestId getFirstAckRequest() { return requester.getFirstAckRequest(); }
+ RequestId getLastAckRequest() { return requester.getLastAckRequest(); }
+ RequestId getNextSendRequestId() { return requester.getNextId(); }
+
protected:
void assertMethodOk(AMQMethodBody& method) const;
void assertChannelOpen() const;
@@ -93,13 +97,9 @@ class ChannelAdapter : private BodyHandler {
shared_ptr<AMQMethodBody> method,
const MethodContext& context) = 0;
- RequestId getFirstAckRequest() { return requester.getFirstAckRequest(); }
- RequestId getLastAckRequest() { return requester.getLastAckRequest(); }
- RequestId getNextSendRequestId() { return requester.getNextId(); }
-
private:
class ChannelAdapterHandler;
- friend class ChannelAdapterHandler;
+ friend class ChannelAdapterHandler;
void handleMethod(shared_ptr<AMQMethodBody>);
void handleRequest(shared_ptr<AMQRequestBody>);