Package javax.enterprise.deploy.spi

Examples of javax.enterprise.deploy.spi.Target


      Target[] targets = new Target[hosts.length];

      for (int i = 0; i < hosts.length; i++) {
        HostQuery host = hosts[i];

        Target target = new TargetImpl(host.getName(), null);

        targets[i] = target;
      }

      return targets;
View Full Code Here


      deployExtraFiles(tag, doc);

      TargetModuleID[] targetModules = new TargetModuleID[targetList.length];

      for (int i = 0; i < targetList.length; i++) {
        Target target = targetList[i];

        targetModules[i] = new TargetModuleIDImpl((TargetImpl) target, tag);
      }

      ProgressObjectImpl result = new ProgressObjectImpl(targetModules);
View Full Code Here

            throw new DeploymentException("This command cannot be run unless connecting to a running server.  Specify --url if server is not running on the default port on localhost.");
        }
        Target[] list = connection.getDeploymentManager().getTargets();
        out.println("Available Targets:");
        for(int i = 0; i < list.length; i++) {
            Target target = list[i];
            out.println("  "+target.getName());
        }
    }
View Full Code Here

        for (int i = 0; i < tlist.length; i++) {
            if(found.contains(targetNames.get(i))) {
                throw new DeploymentException("Target list should not contain duplicates ("+targetNames.get(i)+")");
            }
            for (int j = 0; j < all.length; j++) {
                Target server = all[j];
                if(server.getName().equals(targetNames.get(i))) {
                    tlist[i] = server;
                    found.add(server.getName());
                    break;
                }
            }
            if(tlist[i] == null) {
                throw new DeploymentException("No target named '"+targetNames.get(i)+"' was found");
View Full Code Here

    public void execute(PrintWriter out, ServerConnection connection, String[] args) throws DeploymentException {
        Target[] list = connection.getDeploymentManager().getTargets();
        out.println("Available Targets:");
        for(int i = 0; i < list.length; i++) {
            Target target = list[i];
            out.println("  "+target.getName());
        }
    }
View Full Code Here

        for (int i = 0; i < tlist.length; i++) {
            if(found.contains(targetNames.get(i))) {
                throw new DeploymentException("Target list should not contain duplicates ("+targetNames.get(i)+")");
            }
            for (int j = 0; j < all.length; j++) {
                Target server = all[j];
                if(server.getName().equals(targetNames.get(i))) {
                    tlist[i] = server;
                    found.add(server.getName());
                    break;
                }
            }
            if(tlist[i] == null) {
                throw new DeploymentException("No target named '"+targetNames.get(i)+"' was found");
View Full Code Here

        Target[] tlist = new Target[targetNames.size()];
        Target[] all = mgr.getTargets();
        Set found = new HashSet();
        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");
View Full Code Here

        else
            out.println("");

        // for each target, print the modules that were deployed to it
        for (int i = 0; i < tlist.length; i++) {
            Target target = tlist[i];
            if (tlist.length > 1)
                out.println("\n Target " + target);
            printTargetModules(out, target, running, "  + ");
            printTargetModules(out, target, notrunning, "    ");
        }
View Full Code Here

    @Test
    public void testDeploymentManager() throws Exception {
        DeploymentManager manager = getDeploymentManager();
        assertNotNull("DeploymentManager not null", manager);
        Target target = manager.getTargets()[0];
        assertEquals("ServerDeploymentManager target", target.getDescription());
    }
View Full Code Here

                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);
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.spi.Target

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.