private Target[] targets() { return dm.getTargets(); }
@Override public Target[] execute(DeploymentManager manager) throws ExecutionException { try { return manager.getTargets(); } catch (IllegalStateException ex) { throw new ExecutionException(ex); } } });
@Override public Target[] getTargets() throws IllegalStateException { return getDeploymentManager().getTargets(); }
protected static Target[] identifyTargets(List<String> targetNames, final DeploymentManager mgr) throws DeploymentException { //TODO consider if nicknames that match multiple servers should be allowed. Also if regexps should be used in matching Target[] tlist = new Target[targetNames.size()]; Target[] all = mgr.getTargets(); Set<String> found = new HashSet<String>(); for (int i = 0; i < tlist.length; i++) { for (int j = 0; j < all.length; j++) { Target server = all[j]; // check for exact target name match if (server.getName().equals(targetNames.get(i)) // check for "target-nickname" match (they match if // the full target name contains the user-provided // nickname) || server.getName().indexOf(targetNames.get(i).toString()) > -1) { tlist[i] = server; if (found.contains(server.getName())) { throw new DeploymentException("Target list should not contain duplicates or nicknames that match duplicates (" + targetNames.get(i) + ")"); } found.add(server.getName()); break; } } if (tlist[i] == null) { throw new DeploymentException("No target named or matching '" + targetNames.get(i) + "' was found"); } } return tlist; } }
Target[] targets = manager.getTargets(); if (targets != null) { closeTargets(targets);
if (ServerLocationManager.getAppServerPlatformVersion(sdmi.getPlatformRoot()) <= ServerLocationManager.GF_V2) { Target[] targs = manager.getTargets(); if (null == targs || targs.length == 0) {
((JMXDeploymentManager) mgr).setLogConfiguration(false, true); Target[] targets = mgr.getTargets(); if (null == targets) { throw new IllegalStateException("No target to distribute to");
try { Thread.currentThread().setContextClassLoader(ServerLocationManager.getServerOnlyClassLoader(getPlatformRoot())); retVal = innerDM.getTargets(); } catch (IllegalStateException ise) { retVal = new Target[0];
targs = getDeploymentManager().getTargets(); if (targs == null && ProfilerSupport.getState() == ProfilerSupport.STATE_PROFILING) { try {
deploymentManager.getTargets());
this.filterTargets(deploymentManager.getTargets()), deployableFile, null); this.waitForProgressObject(progressObject);
moduleTypeMapper.getModuleType(archive), getDeploymentManager().getTargets()); TargetModuleID moduleInfoMatch = null; for (TargetModuleID candidate : availableModuleIDs)
Target[] tlist = identifyTargets(targets, mgr); if(tlist.length == 0) { tlist = mgr.getTargets();
public void execute(ConsoleReader consoleReader, ServerConnection connection, CommandArgs commandArgs) throws DeploymentException { try { Target[] list = connection.getDeploymentManager().getTargets(); if ((list == null) || (list.length == 0)) { consoleReader.printString("No available targets."); consoleReader.printNewline(); } else { consoleReader.printString("Available Targets:"); consoleReader.printNewline(); for (int i = 0; i < list.length; i++) { Target target = list[i]; consoleReader.printString(" "+target.getName()); consoleReader.printNewline(); } } } catch (IOException e) { throw new DeploymentException("Could not write to console", e); } } }
Target[] targets = mgr.getTargets(); if (null == targets) { throw new IllegalStateException("No target to distribute to");
Target[] allTargets = mgr.getTargets(); TargetModuleID[] allModules; try { waitForProgress(consoleReader, po); } else { Target[] tlist = mgr.getTargets(); if (null == tlist) { throw new IllegalStateException("No target to distribute to");
Target[] allTargets = mgr.getTargets(); TargetModuleID[] allModules; try {
resetModuleStatus(); ProgressObject progress = deploymentManager.distribute( deploymentManager.getTargets(), moduleTypeMapper.getModuleType(archive), archive.as(ZipExporter.class).exportZip(), null); progress.addProgressListener(new JSR88DeploymentListener(this, progress.getResultTargetModuleIDs(), CommandType.DISTRIBUTE));
out.flush(); out.close(); Target[] targets = mgr.getTargets(); if (null == targets) { throw new IllegalStateException("No target to distribute to");
waitForProgress(out, po); } else { Target[] tlist = mgr.getTargets(); if (null == tlist) { throw new IllegalStateException("No target to distribute to");