diff options
author | Alan Conway <aconway@apache.org> | 2008-03-18 21:31:08 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-03-18 21:31:08 +0000 |
commit | 36e23bcefbf0a6893370cb041bd05a662f0b2758 (patch) | |
tree | 601d29d88e873ac4d58da3cdb2753f02b64998bc /cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp | |
parent | eac0911169b24e708637572fe6b5a8283b3f49e0 (diff) | |
download | qpid-python-36e23bcefbf0a6893370cb041bd05a662f0b2758.tar.gz |
Make AsyncIOAcceptor multi-protocol:
- ConnectionCodec interface replaces ConnectionInputHandle, moves encoding/decoding out of AsyncIOAcceptor.
- ConnectionCodec::Factory replaces ConnectionInputHandlerFactory
- Acceptor creates version-specific ConnectionCodec based on protocol header.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@638590 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp')
-rw-r--r-- | cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp b/cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp index 6c3d960d1f..f1bbf7d10e 100644 --- a/cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp +++ b/cpp/src/qpid/broker/MultiVersionConnectionInputHandler.cpp @@ -31,19 +31,6 @@ MultiVersionConnectionInputHandler::MultiVersionConnectionInputHandler( Broker& _broker, const std::string& _id) : linkVersion(99,0), out(_out), broker(_broker), id(_id) {} - -void MultiVersionConnectionInputHandler::initiated(const qpid::framing::ProtocolInitiation& i) -{ - if (i.getMajor() == 99 && i.getMinor() == 0) { - handler = std::auto_ptr<ConnectionInputHandler>(new PreviewConnection(out, broker, id)); - } else if (i.getMajor() == 0 && i.getMinor() == 10) { - handler = std::auto_ptr<ConnectionInputHandler>(new Connection(out, broker, id)); - } else { - throw qpid::framing::InternalErrorException("Unsupported version: " + i.getVersion().toString()); - } - handler->initiated(i); -} - void MultiVersionConnectionInputHandler::received(qpid::framing::AMQFrame& f) { check(); @@ -67,11 +54,6 @@ bool MultiVersionConnectionInputHandler::doOutput() return handler.get() && handler->doOutput(); } -qpid::framing::ProtocolInitiation MultiVersionConnectionInputHandler::getInitiation() -{ - return qpid::framing::ProtocolInitiation(linkVersion); -} - void MultiVersionConnectionInputHandler::closed() { if (handler.get()) handler->closed(); |