summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-06-10 19:46:59 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-06-10 19:46:59 +0000
commit675ca72f18806c7e7bfd71377f9819e712bf6ce0 (patch)
treee672be3acdf44ab2693ab93ceb99eda7002d7193
parentbfbf9ab02668e752bbc079ef1cde06a52cf1fa49 (diff)
downloadqpid-python-675ca72f18806c7e7bfd71377f9819e712bf6ce0.tar.gz
QPID-4905: Remove unused Connection ErrorListener interface
- was only used by removed cluster support git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1491584 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--cpp/src/qpid/broker/Connection.cpp1
-rw-r--r--cpp/src/qpid/broker/Connection.h15
-rw-r--r--cpp/src/qpid/broker/ConnectionHandler.cpp3
-rw-r--r--cpp/src/qpid/broker/SessionHandler.cpp6
4 files changed, 0 insertions, 25 deletions
diff --git a/cpp/src/qpid/broker/Connection.cpp b/cpp/src/qpid/broker/Connection.cpp
index 5a42f371f1..0165c31750 100644
--- a/cpp/src/qpid/broker/Connection.cpp
+++ b/cpp/src/qpid/broker/Connection.cpp
@@ -97,7 +97,6 @@ Connection::Connection(ConnectionOutputHandler* out_,
links(broker_.getLinks()),
agent(0),
timer(broker_.getTimer()),
- errorListener(0),
objectId(objectId_),
outboundTracker(*this)
{
diff --git a/cpp/src/qpid/broker/Connection.h b/cpp/src/qpid/broker/Connection.h
index bf287cd85d..8b9db7f636 100644
--- a/cpp/src/qpid/broker/Connection.h
+++ b/cpp/src/qpid/broker/Connection.h
@@ -62,17 +62,6 @@ class Connection : public sys::ConnectionInputHandler,
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::ConnectionInputHandler,
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::ConnectionInputHandler,
sys::Timer& timer;
boost::intrusive_ptr<sys::TimerTask> heartbeatTimer, linkHeartbeatTimer;
boost::intrusive_ptr<ConnectionTimeoutTask> timeoutTimer;
- ErrorListener* errorListener;
uint64_t objectId;
framing::FieldTable clientProperties;
diff --git a/cpp/src/qpid/broker/ConnectionHandler.cpp b/cpp/src/qpid/broker/ConnectionHandler.cpp
index 68061e2924..e86dcdb086 100644
--- a/cpp/src/qpid/broker/ConnectionHandler.cpp
+++ b/cpp/src/qpid/broker/ConnectionHandler.cpp
@@ -86,7 +86,6 @@ bool ConnectionHandler::handle(const framing::AMQMethodBody& method)
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::AMQFrame& frame)
"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());
}
}
diff --git a/cpp/src/qpid/broker/SessionHandler.cpp b/cpp/src/qpid/broker/SessionHandler.cpp
index a6b008647f..28827ccb9e 100644
--- a/cpp/src/qpid/broker/SessionHandler.cpp
+++ b/cpp/src/qpid/broker/SessionHandler.cpp
@@ -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);
}