diff options
author | Benoit Foucher <benoit@zeroc.com> | 2005-06-30 13:35:14 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2005-06-30 13:35:14 +0000 |
commit | 44e9ba02f6402587d1757708c78a007a143fc204 (patch) | |
tree | f0e03f52ce60485937c13af977f68107bcd5f82a /cpp/src/IceGrid/IceGridObserver.cpp | |
parent | Merged fix from branch (throughput performance issue on Win32) (diff) | |
download | ice-44e9ba02f6402587d1757708c78a007a143fc204.tar.bz2 ice-44e9ba02f6402587d1757708c78a007a143fc204.tar.xz ice-44e9ba02f6402587d1757708c78a007a143fc204.zip |
Changed to the observer interfaces.
Diffstat (limited to 'cpp/src/IceGrid/IceGridObserver.cpp')
-rw-r--r-- | cpp/src/IceGrid/IceGridObserver.cpp | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/cpp/src/IceGrid/IceGridObserver.cpp b/cpp/src/IceGrid/IceGridObserver.cpp index d0679587a2e..2cbb659c054 100644 --- a/cpp/src/IceGrid/IceGridObserver.cpp +++ b/cpp/src/IceGrid/IceGridObserver.cpp @@ -76,14 +76,8 @@ class RegistryObserverI : public RegistryObserver public: virtual void - init(int, const ApplicationDescriptorSeq&, const Ice::StringSeq& nodes, const Ice::Current&) + init(int, const ApplicationDescriptorSeq&, const Ice::Current&) { - cout << "active nodes: "; - for(Ice::StringSeq::const_iterator p = nodes.begin(); p != nodes.end(); ++p) - { - cout << *p << " "; - } - cout << endl; } virtual void @@ -109,18 +103,6 @@ public: { cout << "application `" << app->name << "' synced (serial = " << serial << ")" << endl; } - - virtual void - nodeUp(const string& name, const Ice::Current& current) - { - cout << "node `" << name << "' is up" << endl; - } - - virtual void - nodeDown(const string& name, const Ice::Current& current) - { - cout << "node `" << name << "' is down" << endl; - } }; class NodeObserverI : public NodeObserver @@ -132,12 +114,12 @@ public: { for(NodeDynamicInfoSeq::const_iterator p = nodes.begin(); p != nodes.end(); ++p) { - initNode(*p, c); + nodeUp(*p, c); } } - virtual void - initNode(const NodeDynamicInfo& node, const Ice::Current&) + virtual void + nodeUp(const NodeDynamicInfo& node, const Ice::Current& current) { cout << "node `" << node.name << "' servers: "; for(ServerDynamicInfoSeq::const_iterator p = node.servers.begin(); p != node.servers.end(); ++p) @@ -153,6 +135,12 @@ public: } virtual void + nodeDown(const string& name, const Ice::Current& current) + { + cout << "node `" << name << "' is down" << endl; + } + + virtual void updateServer(const string& node, const ServerDynamicInfo& info, const Ice::Current&) { cout << "node `" << node << "' server `" << info.name << "' updated: pid = " << info.pid << " state = `"; |