diff options
| author | Alan Conway <aconway@apache.org> | 2007-08-14 14:29:07 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-08-14 14:29:07 +0000 |
| commit | b3ddadd9b15088afecf1f9774d2004258b164258 (patch) | |
| tree | 3318dd9b06101ad7d025ccbc80a5b0127846a681 /cpp/src/qpid/framing/ChannelAdapter.cpp | |
| parent | 0f0e942cab53ac81c5adf6fbd5b7cc3a403161e8 (diff) | |
| download | qpid-python-b3ddadd9b15088afecf1f9774d2004258b164258.tar.gz | |
Deleted following files that are obsolete for 0-10:
src/qpid/framing/AMQRequestBody.cpp
src/qpid/framing/AMQRequestBody.h
src/qpid/framing/AMQResponseBody.cpp
src/qpid/framing/AMQResponseBody.h
src/qpid/framing/Correlator.cpp
src/qpid/framing/Correlator.h
src/qpid/framing/MethodContext.cpp
src/qpid/framing/Requester.cpp
src/qpid/framing/Requester.h
src/qpid/framing/Responder.cpp
src/qpid/framing/Responder.h
Made changes to support their deletion.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@565770 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/ChannelAdapter.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/ChannelAdapter.cpp | 42 |
1 files changed, 1 insertions, 41 deletions
diff --git a/cpp/src/qpid/framing/ChannelAdapter.cpp b/cpp/src/qpid/framing/ChannelAdapter.cpp index 4ee834b561..b3b442004a 100644 --- a/cpp/src/qpid/framing/ChannelAdapter.cpp +++ b/cpp/src/qpid/framing/ChannelAdapter.cpp @@ -44,55 +44,15 @@ void ChannelAdapter::init(ChannelId i, OutputHandler& out, ProtocolVersion v) handlers.out= make_shared_ptr(new OutputHandlerFrameHandler(out)); } -RequestId ChannelAdapter::send( - shared_ptr<AMQBody> body, Correlator::Action action) +RequestId ChannelAdapter::send(shared_ptr<AMQBody> body) { RequestId requestId = 0; assertChannelOpen(); - switch (body->type()) { - case REQUEST_BODY: { - AMQRequestBody::shared_ptr request = - boost::shared_polymorphic_downcast<AMQRequestBody>(body); - requester.sending(request->getData()); - requestId = request->getData().requestId; - if (!action.empty()) - correlator.request(requestId, action); - break; - } - case RESPONSE_BODY: { - AMQResponseBody::shared_ptr response = - boost::shared_polymorphic_downcast<AMQResponseBody>(body); - responder.sending(response->getData()); - break; - } - // No action required for other body types. - } AMQFrame frame(getVersion(), getId(), body); handlers.out->handle(frame); return requestId; } -void ChannelAdapter::handleRequest(AMQRequestBody::shared_ptr request) { - assertMethodOk(*request); - AMQRequestBody::Data& requestData = request->getData(); - responder.received(requestData); - handleMethodInContext(request, MethodContext(this, request)); -} - -void ChannelAdapter::handleResponse(AMQResponseBody::shared_ptr response) { - assertMethodOk(*response); - AMQResponseBody::Data& responseData = response->getData(); - - // FIXME aconway 2007-04-05: processed should be last - // but causes problems with InProcessBroker tests because - // we execute client code in handleMethod. - // Need to introduce a queue & 2 threads for inprocess. - requester.processed(responseData); - // FIXME aconway 2007-04-04: exception handling. - correlator.response(response); - handleMethod(response); -} - void ChannelAdapter::handleMethod(AMQMethodBody::shared_ptr method) { assertMethodOk(*method); handleMethodInContext(method, MethodContext(this, method)); |
