protected Object doExecute() throws Exception { getExistingInstance(instance).stop(); return null; } }
protected Object doExecute() throws Exception { getExistingInstance(instance).changeJavaOpts(javaOpts); return null; } }
protected Object doExecute() throws Exception { getExistingInstance(instance).changeSshHost(host); return null; } }
protected Object doExecute() throws Exception { Map<String, URL> textResources = getResources(textResourceLocation); Map<String, URL> binaryResources = getResources(binaryResourceLocations); InstanceSettings settings = new InstanceSettings(sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts, null, null, textResources, binaryResources); getAdminService().cloneInstance(name, cloneName, settings); return null; }
protected Object doExecute() throws Exception { Map<String, URL> textResources = getResources(textResourceLocation); Map<String, URL> binaryResources = getResources(binaryResourceLocations); InstanceSettings settings = new InstanceSettings(sshPort, rmiRegistryPort, rmiServerPort, location, javaOpts, featureURLs, features, textResources, binaryResources, address); getAdminService().createInstance(instance, settings); return null; } }
static void execute(AdminCommandSupport command, File storageFile, String[] args) throws Exception { DefaultActionPreparator dap = new DefaultActionPreparator(); List<Object> params = new ArrayList<Object>(Arrays.asList(args)); params.remove(0); // this is the actual command name if (!dap.prepare(command, null, params)) { return; } AdminServiceImpl admin = new AdminServiceImpl(); admin.setStorageLocation(storageFile); command.setAdminService(admin); command.execute(null); }
protected Object doExecute() throws Exception { getExistingInstance(instance).destroy(); return null; }
protected Object doExecute() throws Exception { getAdminService().renameInstance(instance, newName); return null; }
public Object doExecute() throws Exception { getExistingInstance(instance).changeRmiServerPort(port); return null; }
protected Object doExecute() throws Exception { getExistingInstance(instance).changeSshPort(port); return null; } }
protected Object doExecute() throws Exception { getExistingInstance(instance).changeRmiRegistryPort(port); return null; }
protected Object doExecute() throws Exception { System.out.println(getExistingInstance(name).getState()); return null; }
protected Object doExecute() throws Exception { Instance child = getExistingInstance(instance); if (wait) { String state = child.getState(); if (Instance.STOPPED.equals(state)) { child.start(javaOpts); } if (!Instance.STARTED.equals(state)) { do { Thread.sleep(500); state = child.getState(); } while (Instance.STARTING.equals(state)); } } else { child.start(javaOpts); } return null; } }
protected Object doExecute() throws Exception { String cmdStr = ""; if (command != null) { StringBuilder sb = new StringBuilder(); for (String cmd : command) { if (sb.length() > 0) { sb.append(' '); } sb.append(cmd); } cmdStr = "'" + sb.toString().replaceAll("'", "\\'") + "'"; } int port = getExistingInstance(instance).getSshPort(); if (username != null) { if (password == null) { session.execute("ssh -l " + username + " -p " + port + " localhost " + cmdStr); } else { session.execute("ssh -l " + username + " -P " + password + " -p " + port + " localhost " + cmdStr); } } else { session.execute("ssh -p " + port + " localhost " + cmdStr); } return null; } }
protected Object doExecute() throws Exception { getAdminService().refreshInstance(); Instance[] instances = getAdminService().getInstances(); if (javaOpts) { System.out.println(" SSH Port RMI Ports State Pid JavaOpts");