diff options
author | Bernard Normier <bernard@zeroc.com> | 2006-12-21 18:01:22 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2006-12-21 18:01:22 +0000 |
commit | 3c807be4d33a23a116ef935440bc7e5bd6a00a52 (patch) | |
tree | 2702fb19a321b9c1afda94be51a3fd31ce31928f /java/src/IceGridGUI/NodeObserverI.java | |
parent | New IceGridAdmin trace properties (diff) | |
download | ice-3c807be4d33a23a116ef935440bc7e5bd6a00a52.tar.bz2 ice-3c807be4d33a23a116ef935440bc7e5bd6a00a52.tar.xz ice-3c807be4d33a23a116ef935440bc7e5bd6a00a52.zip |
Fixed bugs #1640 and #1641
Diffstat (limited to 'java/src/IceGridGUI/NodeObserverI.java')
-rwxr-xr-x | java/src/IceGridGUI/NodeObserverI.java | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/java/src/IceGridGUI/NodeObserverI.java b/java/src/IceGridGUI/NodeObserverI.java index f5d389c492e..fb00b5e0615 100755 --- a/java/src/IceGridGUI/NodeObserverI.java +++ b/java/src/IceGridGUI/NodeObserverI.java @@ -16,10 +16,30 @@ class NodeObserverI extends _NodeObserverDisp NodeObserverI(Coordinator coordinator) { _coordinator = coordinator; + _trace = _coordinator.traceObservers(); } public void nodeInit(final NodeDynamicInfo[] nodes, Ice.Current current) { + if(_trace) + { + if(nodes.length == 0) + { + _coordinator.traceObserver("nodeInit (no node)"); + } + else + { + String names = ""; + for(int i = 0; i < nodes.length; ++i) + { + names += " " + nodes[i].info.name; + } + _coordinator.traceObserver("nodeInit for node" + + (nodes.length == 1 ? "" : "s") + + names); + } + } + SwingUtilities.invokeLater(new Runnable() { public void run() @@ -34,6 +54,11 @@ class NodeObserverI extends _NodeObserverDisp public void nodeUp(final NodeDynamicInfo nodeInfo, Ice.Current current) { + if(_trace) + { + _coordinator.traceObserver("nodeUp for node " + nodeInfo.info.name); + } + SwingUtilities.invokeLater(new Runnable() { public void run() @@ -45,6 +70,11 @@ class NodeObserverI extends _NodeObserverDisp public void nodeDown(final String nodeName, Ice.Current current) { + if(_trace) + { + _coordinator.traceObserver("nodeUp for node " + nodeName); + } + SwingUtilities.invokeLater(new Runnable() { public void run() @@ -57,6 +87,13 @@ class NodeObserverI extends _NodeObserverDisp public void updateServer(final String node, final ServerDynamicInfo updatedInfo, Ice.Current current) { + if(_trace) + { + _coordinator.traceObserver("updateServer for server " + updatedInfo.id + + " on node " + node + "; new state is " + + updatedInfo.state.toString()); + } + SwingUtilities.invokeLater(new Runnable() { public void run() @@ -69,6 +106,14 @@ class NodeObserverI extends _NodeObserverDisp public void updateAdapter(final String node, final AdapterDynamicInfo updatedInfo, Ice.Current current) { + if(_trace) + { + _coordinator.traceObserver("updateAdapter for adapter " + updatedInfo.id + + " on node " + node + "; new proxy is " + + (updatedInfo.proxy == null ? "null" + : updatedInfo.proxy.toString())); + } + SwingUtilities.invokeLater(new Runnable() { public void run() @@ -78,5 +123,6 @@ class NodeObserverI extends _NodeObserverDisp }); } - private Coordinator _coordinator; + private final Coordinator _coordinator; + private final boolean _trace; }; |