diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-09-24 17:07:33 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-09-24 17:07:33 -0400 |
commit | 080656b952732140cae223651714b0a0fc460b08 (patch) | |
tree | fea62f6e795b522ac64230c0a67f7c9cd89544ef /java/src/IceGridGUI/LiveDeployment/Server.java | |
parent | Fixed test warning (diff) | |
download | ice-080656b952732140cae223651714b0a0fc460b08.tar.bz2 ice-080656b952732140cae223651714b0a0fc460b08.tar.xz ice-080656b952732140cae223651714b0a0fc460b08.zip |
Squashed commit of the following:
commit 67f0310e1125b278157942d1387f694d9bf9921a
Author: Bernard Normier <bernard@zeroc.com>
Date: Mon Sep 24 16:56:17 2007 -0400
Added ability to retrieve server properties from IceGrid GUI
Diffstat (limited to 'java/src/IceGridGUI/LiveDeployment/Server.java')
-rwxr-xr-x | java/src/IceGridGUI/LiveDeployment/Server.java | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/Server.java b/java/src/IceGridGUI/LiveDeployment/Server.java index 4ba21661ef3..0ae8bc93d69 100755 --- a/java/src/IceGridGUI/LiveDeployment/Server.java +++ b/java/src/IceGridGUI/LiveDeployment/Server.java @@ -16,6 +16,7 @@ import javax.swing.JMenu; import javax.swing.JOptionPane; import javax.swing.JPopupMenu; import javax.swing.JTree; +import javax.swing.SwingUtilities; import javax.swing.tree.DefaultTreeCellRenderer; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; @@ -420,6 +421,88 @@ class Server extends ListArrayTreeNode } } + public void showRuntimeProperties() + { + AMI_Admin_getServerProperties cb = new AMI_Admin_getServerProperties() + { + public void ice_response(final java.util.Map properties) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + _editor.setRuntimeProperties((java.util.SortedMap)properties, Server.this); + } + }); + } + + public void ice_exception(final Ice.UserException e) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + if(e instanceof IceGrid.ServerUnreachableException) + { + _editor.setBuildId("Error: can't reach this server", Server.this); + } + else if(e instanceof IceGrid.NodeNotExistException) + { + _editor.setBuildId( + "Error: this node is not known to this IceGrid Registry", + Server.this); + } + else if(e instanceof IceGrid.NodeUnreachableException) + { + _editor.setBuildId("Error: cannot reach this node", Server.this); + } + else + { + _editor.setBuildId("Error: " + e.toString(), Server.this); + } + } + }); + } + + public void ice_exception(final Ice.LocalException e) + { + SwingUtilities.invokeLater(new Runnable() + { + public void run() + { + _editor.setBuildId("Error: " + e.toString(), Server.this); + } + }); + } + }; + + try + { + getCoordinator().getMainFrame().setCursor( + Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + + IceGrid.AdminPrx admin = getCoordinator().getAdmin(); + if(admin == null) + { + _editor.setBuildId("", this); + } + else + { + admin.getServerProperties_async(cb, _id); + } + } + catch(Ice.LocalException e) + { + _editor.setBuildId("Error: " + e.toString(), this); + } + finally + { + getCoordinator().getMainFrame().setCursor( + Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); + } + } + + public JPopupMenu getPopupMenu() { LiveActions la = getCoordinator().getLiveActionsForPopup(); |