summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/ConnectionMonitor.h
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2003-01-17 03:58:50 +0000
committerMarc Laukien <marc@zeroc.com>2003-01-17 03:58:50 +0000
commit8880977a608f0b735504f18a624de026cde62da7 (patch)
treea8fe5b082caf761337a165e1350a5f65f57bc95d /cpp/src/Ice/ConnectionMonitor.h
parentfixed a bug with findObjectAdapter (diff)
downloadice-8880977a608f0b735504f18a624de026cde62da7.tar.bz2
ice-8880977a608f0b735504f18a624de026cde62da7.tar.xz
ice-8880977a608f0b735504f18a624de026cde62da7.zip
ConnectionMonitor
Diffstat (limited to 'cpp/src/Ice/ConnectionMonitor.h')
-rw-r--r--cpp/src/Ice/ConnectionMonitor.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/cpp/src/Ice/ConnectionMonitor.h b/cpp/src/Ice/ConnectionMonitor.h
new file mode 100644
index 00000000000..8431130cb23
--- /dev/null
+++ b/cpp/src/Ice/ConnectionMonitor.h
@@ -0,0 +1,53 @@
+// **********************************************************************
+//
+// Copyright (c) 2002
+// ZeroC, Inc.
+// Billerica, MA, USA
+//
+// All Rights Reserved.
+//
+// Ice is free software; you can redistribute it and/or modify it under
+// the terms of the GNU General Public License version 2 as published by
+// the Free Software Foundation.
+//
+// **********************************************************************
+
+#ifndef ICE_CONNECTION_MONITOR_H
+#define ICE_CONNECTION_MONITOR_H
+
+#include <IceUtil/Mutex.h>
+#include <IceUtil/Monitor.h>
+#include <IceUtil/Thread.h>
+#include <Ice/ConnectionMonitorF.h>
+#include <Ice/ConnectionF.h>
+#include <Ice/InstanceF.h>
+#include <set>
+
+namespace IceInternal
+{
+
+class ConnectionMonitor : public ::IceUtil::Thread, public ::IceUtil::Monitor< ::IceUtil::Mutex>
+{
+public:
+
+ void destroy();
+
+ void add(const ConnectionPtr&);
+ void remove(const ConnectionPtr&);
+
+private:
+
+ ConnectionMonitor(const InstancePtr&, int);
+ virtual ~ConnectionMonitor();
+ friend class Instance;
+
+ virtual void run();
+
+ InstancePtr _instance;
+ const int _interval;
+ std::set<ConnectionPtr> _connections;
+};
+
+}
+
+#endif