Package javax.enterprise.deploy.spi

Examples of javax.enterprise.deploy.spi.Target


            } else {
                moduleId = module;
                webUrl = null;
            }

            Target target = getTargetFor(moduleId);
            if (target != null) {
                if (moduleId.startsWith(target.getName())) {
                    moduleId = moduleId.substring(target.getName().length());
                }
            } else {
                target = defaultTarget;
            }
View Full Code Here


            }
            consoleReader.printNewline();

            // for each target, print the modules that were deployed to it
            for (int i = 0; (tlist != null) && (i < tlist.length); i++) {
                Target target = tlist[i];
                if (tlist.length > 1) {
                    consoleReader.printNewline();
                    consoleReader.printString(" Target " + target);
                    consoleReader.printNewline();
                }
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

            } else {
                moduleId = module;
                webUrl = null;
            }

            Target target = getTargetFor(moduleId);
            if (target != null) {
                if (moduleId.startsWith(target.getName())) {
                    moduleId = moduleId.substring(target.getName().length());
                }
            } else {
                target = defaultTarget;
            }
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

        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

            }
            consoleReader.printNewline();
           
            // for each target, print the modules that were deployed to it
            for (int i = 0; (tlist != null) && (i < tlist.length); i++) {
                Target target = tlist[i];
                if (tlist.length > 1) {
                    consoleReader.printNewline();
                    consoleReader.printString(" Target " + target);
                    consoleReader.printNewline();
                }
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

            Map tmpMap = new HashMap();
            synchronized(nameToInfo) {
                tmpMap.putAll(nameToInfo);
            }
            for (int i = 0; i < moduleIDList.length; i++) {
                Target target= moduleIDList[i].getTarget();
                if ( null == nameToInfo.get(target.getName()) ) {
                    throw new IllegalArgumentException(
                        target + " does not exist.");
                }
            }
            for (int i = 0; i < moduleIDList.length; i++) {
                Target target= moduleIDList[i].getTarget();
                ServerInfo info =
                    (ServerInfo) tmpMap.get(target.getName());
                ProgressObject progress =
                    aCommand.execute(info.server,
                        new TargetModuleID[] {moduleIDList[i]});
                addResult(progress);
            }
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.