qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r620622 - in /incubator/qpid/trunk/qpid/cpp/src/qpid: broker/ConnectionFactory.cpp broker/ConnectionFactory.h sys/AsynchIOAcceptor.cpp sys/ConnectionInputHandlerFactory.h
Date Mon, 11 Feb 2008 21:50:19 GMT
Author: aconway
Date: Mon Feb 11 13:50:17 2008
New Revision: 620622

URL: http://svn.apache.org/viewvc?rev=620622&view=rev
Log:
Remove dependency on sys::Socket for management ID of connections.

Modified:
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.h
    incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
    incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp?rev=620622&r1=620621&r2=620622&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.cpp Mon Feb 11 13:50:17
2008
@@ -36,9 +36,9 @@
 
 qpid::sys::ConnectionInputHandler*
 ConnectionFactory::create(qpid::sys::ConnectionOutputHandler* out,
-                          const qpid::sys::Socket& s)
+                          const std::string& id)
 {
-    return new Connection(out, broker, s.getPeerAddress());
+    return new Connection(out, broker, id);
 }
 
 }} // namespace qpid::broker

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.h?rev=620622&r1=620621&r2=620622&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionFactory.h Mon Feb 11 13:50:17
2008
@@ -32,8 +32,8 @@
   public:
     ConnectionFactory(Broker& b);
             
-    virtual qpid::sys::ConnectionInputHandler* create
-        (qpid::sys::ConnectionOutputHandler* ctxt, const sys::Socket& s);
+    virtual qpid::sys::ConnectionInputHandler*
+    create(qpid::sys::ConnectionOutputHandler* out, const std::string& id);
             
     virtual ~ConnectionFactory();
 

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp?rev=620622&r1=620621&r2=620622&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIOAcceptor.cpp Mon Feb 11 13:50:17 2008
@@ -140,7 +140,7 @@
 void AsynchIOAcceptor::accepted(Poller::shared_ptr poller, const Socket& s, ConnectionInputHandlerFactory*
f) {
 
     AsynchIOHandler* async = new AsynchIOHandler; 
-    ConnectionInputHandler* handler = f->create(async, s);
+    ConnectionInputHandler* handler = f->create(async, s.getPeerAddress());
     AsynchIO* aio = new AsynchIO(s,
                                  boost::bind(&AsynchIOHandler::readbuff, async, _1, _2),
                                  boost::bind(&AsynchIOHandler::eof, async, _1),
@@ -194,7 +194,7 @@
     socket->connect(host, port);
     AsynchIOHandler* async = new AsynchIOHandler; 
     async->setClient();
-    ConnectionInputHandler* handler = f->create(async, *socket);
+    ConnectionInputHandler* handler = f->create(async, socket->getPeerAddress());
     AsynchIO* aio = new AsynchIO(*socket,
                                  boost::bind(&AsynchIOHandler::readbuff, async, _1, _2),
                                  boost::bind(&AsynchIOHandler::eof, async, _1),

Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h?rev=620622&r1=620621&r2=620622&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h (original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/sys/ConnectionInputHandlerFactory.h Mon Feb 11
13:50:17 2008
@@ -22,7 +22,7 @@
 #define _ConnectionInputHandlerFactory_
 
 #include <boost/noncopyable.hpp>
-#include "qpid/sys/Socket.h"
+#include <string>
 
 namespace qpid {
 namespace sys {
@@ -37,7 +37,13 @@
 class ConnectionInputHandlerFactory : private boost::noncopyable
 {
   public:
-    virtual ConnectionInputHandler* create(ConnectionOutputHandler* ctxt, const Socket&
s) = 0;
+    /**
+     *@param out handler for connection output.
+     *@param id identify the connection for management purposes.
+     */
+    virtual ConnectionInputHandler* create(ConnectionOutputHandler* out,
+                                           const std::string& id) = 0;
+    
     virtual ~ConnectionInputHandlerFactory(){}
 };
 



Mime
View raw message