diff options
| author | Andrew Stitcher <astitcher@apache.org> | 2013-06-10 19:47:10 +0000 |
|---|---|---|
| committer | Andrew Stitcher <astitcher@apache.org> | 2013-06-10 19:47:10 +0000 |
| commit | c2eaa6bdc87b11c38ee8d41f178611ee41dd7842 (patch) | |
| tree | b53c83e81c660855d6c9fea9c4c5ac97bdc26cc6 /cpp/src/qpid/client | |
| parent | 59a96151f1e0111718f8ad6ace7de0e709a73a80 (diff) | |
| download | qpid-python-c2eaa6bdc87b11c38ee8d41f178611ee41dd7842.tar.gz | |
QPID-4905: Removed TimeoutHandler interface as it was really unused
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1491585 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/client')
| -rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.cpp | 14 | ||||
| -rw-r--r-- | cpp/src/qpid/client/ConnectionImpl.h | 5 |
2 files changed, 5 insertions, 14 deletions
diff --git a/cpp/src/qpid/client/ConnectionImpl.cpp b/cpp/src/qpid/client/ConnectionImpl.cpp index dbb0a67d22..056a53f263 100644 --- a/cpp/src/qpid/client/ConnectionImpl.cpp +++ b/cpp/src/qpid/client/ConnectionImpl.cpp @@ -149,16 +149,16 @@ IOThread& theIO() { } class HeartbeatTask : public TimerTask { - TimeoutHandler& timeout; + ConnectionImpl& timeout; void fire() { // If we ever get here then we have timed out QPID_LOG(debug, "Traffic timeout"); - timeout.idleIn(); + timeout.timeout(); } public: - HeartbeatTask(Duration p, TimeoutHandler& t) : + HeartbeatTask(Duration p, ConnectionImpl& t) : TimerTask(p,"Heartbeat"), timeout(t) {} @@ -304,17 +304,11 @@ void ConnectionImpl::open() } } -void ConnectionImpl::idleIn() +void ConnectionImpl::timeout() { connector->abort(); } -void ConnectionImpl::idleOut() -{ - AMQFrame frame((AMQHeartbeatBody())); - connector->handle(frame); -} - void ConnectionImpl::close() { if (heartbeatTask) diff --git a/cpp/src/qpid/client/ConnectionImpl.h b/cpp/src/qpid/client/ConnectionImpl.h index cc81500b18..b07ce142fb 100644 --- a/cpp/src/qpid/client/ConnectionImpl.h +++ b/cpp/src/qpid/client/ConnectionImpl.h @@ -28,7 +28,6 @@ #include "qpid/framing/FrameHandler.h" #include "qpid/sys/Mutex.h" #include "qpid/sys/ShutdownHandler.h" -#include "qpid/sys/TimeoutHandler.h" #include <map> #include <iosfwd> @@ -46,7 +45,6 @@ class SessionImpl; class ConnectionImpl : public Bounds, public framing::FrameHandler, - public sys::TimeoutHandler, public sys::ShutdownHandler, public boost::enable_shared_from_this<ConnectionImpl> { @@ -69,8 +67,6 @@ class ConnectionImpl : public Bounds, void incoming(framing::AMQFrame& frame); void closed(uint16_t, const std::string&); - void idleOut(); - void idleIn(); void shutdown(); void failedConnection(); void release(); @@ -90,6 +86,7 @@ class ConnectionImpl : public Bounds, void addSession(const boost::shared_ptr<SessionImpl>&, uint16_t channel=NEXT_CHANNEL); void close(); + void timeout(); void handle(framing::AMQFrame& frame); void erase(uint16_t channel); const ConnectionSettings& getNegotiatedSettings(); |
