diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
commit | b51469b41167fb86ae2059a15cf0475c53fdda7b (patch) | |
tree | fc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /java/src/IceGridGUI/LiveDeployment/Slave.java | |
parent | Fixed (ICE-5695) - IceSSL: misleading exception (diff) | |
download | ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2 ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip |
Down with ant. From the gradle to the grave.
Diffstat (limited to 'java/src/IceGridGUI/LiveDeployment/Slave.java')
-rw-r--r-- | java/src/IceGridGUI/LiveDeployment/Slave.java | 185 |
1 files changed, 0 insertions, 185 deletions
diff --git a/java/src/IceGridGUI/LiveDeployment/Slave.java b/java/src/IceGridGUI/LiveDeployment/Slave.java deleted file mode 100644 index 75d4158f5b3..00000000000 --- a/java/src/IceGridGUI/LiveDeployment/Slave.java +++ /dev/null @@ -1,185 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package IceGridGUI.LiveDeployment; - -import java.awt.Component; -import java.awt.Cursor; - -import javax.swing.JPopupMenu; -import javax.swing.JTree; -import javax.swing.tree.DefaultTreeCellRenderer; -import IceGrid.*; -import IceGridGUI.*; - -class Slave extends TreeNode -{ - // - // Actions - // - @Override - public boolean[] getAvailableActions() - { - boolean[] actions = new boolean[IceGridGUI.LiveDeployment.TreeNode.ACTION_COUNT]; - actions[SHUTDOWN_REGISTRY] = true; - actions[RETRIEVE_STDOUT] = true; - actions[RETRIEVE_STDERR] = true; - return actions; - } - - @Override - public void shutdownRegistry() - { - final String prefix = "Shutting down registry '" + _id + "'..."; - getCoordinator().getStatusBar().setText(prefix); - - Callback_Admin_shutdownRegistry cb = new Callback_Admin_shutdownRegistry() - { - // - // Called by another thread! - // - @Override - public void response() - { - amiSuccess(prefix); - } - - @Override - public void exception(Ice.UserException e) - { - amiFailure(prefix, "Failed to shutdown " + _id, e); - } - - @Override - public void exception(Ice.LocalException e) - { - amiFailure(prefix, "Failed to shutdown " + _id, - e.toString()); - } - }; - - try - { - getCoordinator().getMainFrame().setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); - - getCoordinator().getAdmin().begin_shutdownRegistry(_id, cb); - } - catch(Ice.LocalException e) - { - failure(prefix, "Failed to shutdown " + _id, e.toString()); - } - finally - { - getCoordinator().getMainFrame().setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); - } - } - - @Override - public void retrieveOutput(final boolean stdout) - { - getRoot().openShowLogFileDialog(new ShowLogFileDialog.FileIteratorFactory() - { - @Override - public FileIteratorPrx open(int count) - throws FileNotAvailableException, RegistryNotExistException, RegistryUnreachableException - { - AdminSessionPrx session = getCoordinator().getSession(); - - FileIteratorPrx result; - if(stdout) - { - result = session.openRegistryStdOut(_id, count); - } - else - { - result = session.openRegistryStdErr(_id, count); - } - return result; - } - - @Override - public String getTitle() - { - return "Registry " + _title + " " + (stdout ? "stdout" : "stderr"); - } - - @Override - public String getDefaultFilename() - { - return _id + (stdout ? ".out" : ".err"); - } - }); - } - - @Override - public JPopupMenu getPopupMenu() - { - LiveActions la = getCoordinator().getLiveActionsForPopup(); - - if(_popup == null) - { - _popup = new JPopupMenu(); - _popup.add(la.get(RETRIEVE_STDOUT)); - _popup.add(la.get(RETRIEVE_STDERR)); - _popup.addSeparator(); - _popup.add(la.get(SHUTDOWN_REGISTRY)); - } - - la.setTarget(this); - return _popup; - } - - @Override - public Editor getEditor() - { - if(_editor == null) - { - _editor = new SlaveEditor(); - } - _editor.show(_info); - return _editor; - } - - @Override - public Component getTreeCellRendererComponent( - JTree tree, - Object value, - boolean sel, - boolean expanded, - boolean leaf, - int row, - boolean hasFocus) - { - if(_cellRenderer == null) - { - // - // TODO: separate icon for master - // - - _cellRenderer = new DefaultTreeCellRenderer(); - _cellRenderer.setLeafIcon(Utils.getIcon("/icons/16x16/registry.png")); - } - - return _cellRenderer.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); - } - - Slave(TreeNode parent, RegistryInfo info, String instanceName) - { - super(parent, info.name); - _info = info; - _title = instanceName + " (" + info.name + ")"; - } - - private final RegistryInfo _info; - private final String _title; - - static private DefaultTreeCellRenderer _cellRenderer; - static private SlaveEditor _editor; - static private JPopupMenu _popup; -} |