qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From astitc...@apache.org
Subject svn commit: r1491584 - in /qpid/trunk/qpid/cpp/src/qpid/broker: Connection.cpp Connection.h ConnectionHandler.cpp SessionHandler.cpp
Date Mon, 10 Jun 2013 19:47:01 GMT
Author: astitcher
Date: Mon Jun 10 19:46:59 2013
New Revision: 1491584

URL: http://svn.apache.org/r1491584
Log:
QPID-4905: Remove unused Connection ErrorListener interface
- was only used by removed cluster support

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h
    qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
    qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp?rev=1491584&r1=1491583&r2=1491584&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.cpp Mon Jun 10 19:46:59 2013
@@ -97,7 +97,6 @@ Connection::Connection(ConnectionOutputH
     links(broker_.getLinks()),
     agent(0),
     timer(broker_.getTimer()),
-    errorListener(0),
     objectId(objectId_),
     outboundTracker(*this)
 {

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h?rev=1491584&r1=1491583&r2=1491584&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Connection.h Mon Jun 10 19:46:59 2013
@@ -62,17 +62,6 @@ class Connection : public sys::Connectio
                    public RefCounted
 {
   public:
-    /**
-     * Listener that can be registered with a Connection to be informed of errors.
-     */
-    class ErrorListener
-    {
-      public:
-        virtual ~ErrorListener() {}
-        virtual void sessionError(uint16_t channel, const std::string&) = 0;
-        virtual void connectionError(const std::string&) = 0;
-    };
-
     Connection(sys::ConnectionOutputHandler* out,
                Broker& broker,
                const std::string& mgmtId,
@@ -128,9 +117,6 @@ class Connection : public sys::Connectio
     const std::string& getMgmtId() const { return mgmtId; }
     management::ManagementAgent* getAgent() const { return agent; }
     void setUserProxyAuth(bool b);
-    /** Connection does not delete the listener. 0 resets. */
-    void setErrorListener(ErrorListener* l) { errorListener=l; }
-    ErrorListener* getErrorListener() { return errorListener; }
 
     void setHeartbeatInterval(uint16_t heartbeat);
     void sendHeartbeat();
@@ -170,7 +156,6 @@ class Connection : public sys::Connectio
     sys::Timer& timer;
     boost::intrusive_ptr<sys::TimerTask> heartbeatTimer, linkHeartbeatTimer;
     boost::intrusive_ptr<ConnectionTimeoutTask> timeoutTimer;
-    ErrorListener* errorListener;
     uint64_t objectId;
     framing::FieldTable clientProperties;
 

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp?rev=1491584&r1=1491583&r2=1491584&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/ConnectionHandler.cpp Mon Jun 10 19:46:59 2013
@@ -86,7 +86,6 @@ bool ConnectionHandler::handle(const fra
 void ConnectionHandler::handle(framing::AMQFrame& frame)
 {
     AMQMethodBody* method=frame.getBody()->getMethod();
-    Connection::ErrorListener* errorListener = handler->connection.getErrorListener();
     try{
         if (method && handle(*method)) {
             // This is a connection control frame, nothing more to do.
@@ -98,10 +97,8 @@ void ConnectionHandler::handle(framing::
                 "Connection not yet open, invalid frame received.");
         }
     }catch(ConnectionException& e){
-        if (errorListener) errorListener->connectionError(e.what());
         handler->proxy.close(e.code, e.what());
     }catch(std::exception& e){
-        if (errorListener) errorListener->connectionError(e.what());
         handler->proxy.close(541/*internal error*/, e.what());
     }
 }

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp?rev=1491584&r1=1491583&r2=1491584&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionHandler.cpp Mon Jun 10 19:46:59 2013
@@ -44,8 +44,6 @@ void SessionHandler::connectionException
     framing::connection::CloseCode code, const std::string& msg)
 {
     // NOTE: must tell the error listener _before_ calling connection.close()
-    if (connection.getErrorListener())
-        connection.getErrorListener()->connectionError(msg);
     if (errorListener)
         errorListener->connectionException(code, msg);
     connection.close(code, msg);
@@ -54,8 +52,6 @@ void SessionHandler::connectionException
 void SessionHandler::channelException(
     framing::session::DetachCode code, const std::string& msg)
 {
-    if (connection.getErrorListener())
-        connection.getErrorListener()->sessionError(getChannel(), msg);
     if (errorListener)
         errorListener->channelException(code, msg);
 }
@@ -63,8 +59,6 @@ void SessionHandler::channelException(
 void SessionHandler::executionException(
     framing::execution::ErrorCode code, const std::string& msg)
 {
-    if (connection.getErrorListener())
-        connection.getErrorListener()->sessionError(getChannel(), msg);
     if (errorListener)
         errorListener->executionException(code, msg);
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message