1
1
// **********************************************************************
3
// Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved.
3
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
5
5
// This copy of Ice is licensed to you under the terms described in the
6
6
// ICE_LICENSE file included in this distribution.
8
8
// **********************************************************************
11
12
import java.awt.event.ActionEvent;
29
putValue(Action.SHORT_DESCRIPTION,
30
putValue(Action.SHORT_DESCRIPTION, "Send " + _name);
33
public void actionPerformed(ActionEvent e)
33
public void actionPerformed(ActionEvent e)
35
35
_target.signal(_name);
37
37
private String _name;
41
40
public Action get(int index)
43
42
return _array[index];
46
45
public boolean[] setTarget(TreeNode target)
70
_array[TreeNode.START] = new AbstractAction(
71
"Start", Utils.getIcon("/icons/16x16/start.png"))
69
_array[TreeNode.START] = new AbstractAction("Start", Utils.getIcon("/icons/16x16/start.png"))
73
public void actionPerformed(ActionEvent e)
71
public void actionPerformed(ActionEvent e)
78
_array[TreeNode.START].putValue(Action.SHORT_DESCRIPTION,
79
"Start this server or service");
76
_array[TreeNode.START].putValue(Action.SHORT_DESCRIPTION, "Start this server or service");
81
_array[TreeNode.STOP] = new AbstractAction(
82
"Stop", Utils.getIcon("/icons/16x16/stop.png"))
78
_array[TreeNode.STOP] = new AbstractAction("Stop", Utils.getIcon("/icons/16x16/stop.png"))
84
public void actionPerformed(ActionEvent e)
80
public void actionPerformed(ActionEvent e)
89
_array[TreeNode.STOP].putValue(Action.SHORT_DESCRIPTION,
90
"Stop this server or service");
93
_array[TreeNode.ENABLE] = new AbstractAction(
94
"Enable", Utils.getIcon("/icons/16x16/enable.png"))
85
_array[TreeNode.STOP].putValue(Action.SHORT_DESCRIPTION, "Stop this server or service");
88
_array[TreeNode.ENABLE] = new AbstractAction("Enable", Utils.getIcon("/icons/16x16/enable.png"))
96
public void actionPerformed(ActionEvent e)
90
public void actionPerformed(ActionEvent e)
101
_array[TreeNode.ENABLE].putValue(Action.SHORT_DESCRIPTION,
102
"Enable this server");
104
_array[TreeNode.DISABLE] = new AbstractAction(
105
"Disable", Utils.getIcon("/icons/16x16/disable.png"))
95
_array[TreeNode.ENABLE].putValue(Action.SHORT_DESCRIPTION, "Enable this server");
97
_array[TreeNode.DISABLE] = new AbstractAction("Disable", Utils.getIcon("/icons/16x16/disable.png"))
107
public void actionPerformed(ActionEvent e)
99
public void actionPerformed(ActionEvent e)
109
101
_target.disable();
112
_array[TreeNode.DISABLE].putValue(Action.SHORT_DESCRIPTION,
113
"Disable this server");
104
_array[TreeNode.DISABLE].putValue(Action.SHORT_DESCRIPTION, "Disable this server");
115
106
_array[TreeNode.SIGHUP] = new SendSignal("SIGHUP");
116
107
_array[TreeNode.SIGINT] = new SendSignal("SIGINT");
123
114
_array[TreeNode.WRITE_MESSAGE] = new AbstractAction("Write Message")
125
public void actionPerformed(ActionEvent e)
116
public void actionPerformed(ActionEvent e)
127
118
_target.writeMessage();
130
_array[TreeNode.WRITE_MESSAGE].putValue(Action.SHORT_DESCRIPTION,
131
"Write message to stdout or stderr");
121
_array[TreeNode.WRITE_MESSAGE].putValue(Action.SHORT_DESCRIPTION, "Write message to stdout or stderr");
134
124
_array[TreeNode.RETRIEVE_STDOUT] = new AbstractAction("Retrieve stdout")
136
public void actionPerformed(ActionEvent e)
126
public void actionPerformed(ActionEvent e)
138
128
_target.retrieveOutput(true);
141
_array[TreeNode.RETRIEVE_STDOUT].putValue(Action.SHORT_DESCRIPTION,
131
_array[TreeNode.RETRIEVE_STDOUT].putValue(Action.SHORT_DESCRIPTION, "Retrieve stdout");
144
133
_array[TreeNode.RETRIEVE_STDERR] = new AbstractAction("Retrieve stderr")
146
public void actionPerformed(ActionEvent e)
135
public void actionPerformed(ActionEvent e)
148
137
_target.retrieveOutput(false);
151
_array[TreeNode.RETRIEVE_STDERR].putValue(Action.SHORT_DESCRIPTION,
140
_array[TreeNode.RETRIEVE_STDERR].putValue(Action.SHORT_DESCRIPTION, "Retrieve stderr");
154
142
_array[TreeNode.RETRIEVE_LOG] = new AbstractAction("Retrieve Log")
156
public void actionPerformed(ActionEvent e)
144
public void actionPerformed(ActionEvent e)
158
146
_target.retrieveLog();
161
_array[TreeNode.RETRIEVE_LOG].putValue(Action.SHORT_DESCRIPTION,
162
"Retrieve log file from the server");
149
_array[TreeNode.RETRIEVE_LOG].putValue(Action.SHORT_DESCRIPTION, "Retrieve log file from the server");
165
151
_array[TreeNode.SHUTDOWN_NODE] = new AbstractAction("Shutdown")
167
public void actionPerformed(ActionEvent e)
153
public void actionPerformed(ActionEvent e)
169
155
_target.shutdownNode();
173
159
_array[TreeNode.SHUTDOWN_REGISTRY] = new AbstractAction("Shutdown")
175
public void actionPerformed(ActionEvent e)
161
public void actionPerformed(ActionEvent e)
177
163
_target.shutdownRegistry();
181
_array[TreeNode.PATCH_SERVER] =
182
new AbstractAction("Patch Distribution")
167
_array[TreeNode.PATCH_SERVER] = new AbstractAction("Patch Distribution")
184
public void actionPerformed(ActionEvent e)
169
public void actionPerformed(ActionEvent e)
186
171
_target.patchServer();
190
_array[TreeNode.ADD_OBJECT] =
191
new AbstractAction("Add Well-known Object")
175
_array[TreeNode.ADD_OBJECT] = new AbstractAction("Add Well-known Object")
193
public void actionPerformed(ActionEvent e)
177
public void actionPerformed(ActionEvent e)
195
179
_target.addObject();
199
_array[TreeNode.OPEN_DEFINITION] =
200
new AbstractAction("Open Definition")
183
_array[TreeNode.OPEN_DEFINITION] = new AbstractAction("Open Definition")
202
public void actionPerformed(ActionEvent e)
185
public void actionPerformed(ActionEvent e)
204
187
_target.openDefinition();
210
193
private TreeNode _target;