Examples of ProcessExecutor


Examples of com.sun.enterprise.util.ProcessExecutor

            path2Auths = System.getProperty("PATH_2_AUTHS");
        if (System.getProperty("AUTH_TOKEN") != null)
            at = System.getProperty("AUTH_TOKEN");
        try {
            final String[] cmd = new String[]{path2Auths, user};
            ProcessExecutor pe = new ProcessExecutor(cmd);
            pe.setExecutionRetentionFlag(true);
            pe.execute();
            auths.append(pe.getLastExecutionOutput());
            final StringTokenizer st = new StringTokenizer(pe.getLastExecutionOutput(), at);
            while (st.hasMoreTokens()) {
                String t = st.nextToken();
                if (t != null)
                    t = t.trim();
                if (AUTH1.equals(t) || AUTH2.equals(t) || AUTH3.equals(t)) {
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

    private boolean serviceNameExists(final String sn) {
        boolean exists = false;
        try {
            final String[] cmd = new String[]{"/usr/bin/svcs", sn};
            ProcessExecutor pe = new ProcessExecutor(cmd);
            pe.setExecutionRetentionFlag(true);
            pe.execute();
            exists = true;
        }
        catch (final Exception e) {
            //returns a non-zero status -- the service does not exist, status is already set
        }
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

            printOut("Manifest validated: " + manifestPath);
    }

    private void validateService() throws Exception {
        final String[] cmda = new String[]{SMFService.SVCCFG, "validate", getManifestFilePath()};
        final ProcessExecutor pe = new ProcessExecutor(cmda);
        pe.execute();
        if (info.trace)
            printOut("Validated the SMF Service: " + info.fqsn + " using: " + SMFService.SVCCFG);
    }
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

            printOut("Validated the SMF Service: " + info.fqsn + " using: " + SMFService.SVCCFG);
    }

    private boolean importService() throws Exception {
        final String[] cmda = new String[]{SMFService.SVCCFG, "import", getManifestFilePath()};
        final ProcessExecutor pe = new ProcessExecutor(cmda);

        if (info.dryRun)
            cleanupManifest();
        else
            pe.execute(); //throws ExecException in case of an error

        if (info.trace)
            printOut("Imported the SMF Service: " + info.fqsn);
        return (true);
    }
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

            path2Auths = System.getProperty("PATH_2_AUTHS");
        if (System.getProperty("AUTH_TOKEN") != null)
            at = System.getProperty("AUTH_TOKEN");
        try {
            final String[] cmd = new String[]{path2Auths, user};
            ProcessExecutor pe = new ProcessExecutor(cmd);
            pe.setExecutionRetentionFlag(true);
            pe.execute();
            auths.append(pe.getLastExecutionOutput());
            final StringTokenizer st = new StringTokenizer(pe.getLastExecutionOutput(), at);
            while (st.hasMoreTokens()) {
                String t = st.nextToken();
                if (t != null)
                    t = t.trim();
                if (AUTH1.equals(t) || AUTH2.equals(t) || AUTH3.equals(t)) {
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

    private boolean serviceNameExists(final String sn) {
        boolean exists = false;
        try {
            final String[] cmd = new String[]{"/usr/bin/svcs", sn};
            ProcessExecutor pe = new ProcessExecutor(cmd);
            pe.setExecutionRetentionFlag(true);
            pe.execute();
            exists = true;
        }
        catch (final Exception e) {
            //returns a non-zero status -- the service does not exist, status is already set
        }
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

            printOut("Manifest validated: " + manifestPath);
    }

    private void validateService() throws Exception {
        final String[] cmda = new String[]{SMFService.SVCCFG, "validate", getManifestFilePath()};
        final ProcessExecutor pe = new ProcessExecutor(cmda);
        pe.execute();
        if (info.trace)
            printOut("Validated the SMF Service: " + info.fqsn + " using: " + SMFService.SVCCFG);
    }
View Full Code Here

Examples of com.sun.enterprise.util.ProcessExecutor

            printOut("Validated the SMF Service: " + info.fqsn + " using: " + SMFService.SVCCFG);
    }

    private boolean importService() throws Exception {
        final String[] cmda = new String[]{SMFService.SVCCFG, "import", getManifestFilePath()};
        final ProcessExecutor pe = new ProcessExecutor(cmda);

        if (info.dryRun)
            cleanupManifest();
        else
            pe.execute(); //throws ExecException in case of an error

        if (info.trace)
            printOut("Imported the SMF Service: " + info.fqsn);
        return (true);
    }
View Full Code Here

Examples of org.epic.core.util.ProcessExecutor

{
    public CygwinPathMapper() throws CoreException
    {
        try
        {       
            ProcessExecutor executor = new ProcessExecutor();
            ProcessOutput output =
                executor.execute(new String[] { "mount" }, "", new File("."), null);
           
            initMappings(output.stdout.replaceAll("\n", "\r\n"));
        }
        catch (InterruptedException e) { /* can't occur */ }
        catch (IOException e)
View Full Code Here

Examples of org.geotools.process.ProcessExecutor

        Geometry geom = wktReader.read("MULTIPOINT (1 1, 5 4, 7 9, 5 5, 2 2)");
       
        Name name = new NameImpl("tutorial","octagonalEnvelope");
        Process process = Processors.createProcess( name );
       
        ProcessExecutor engine = Processors.newProcessExecutor(2);
       
        // quick map of inputs
        Map<String,Object> input = new KVP("geom", geom);
        Progress working = engine.submit(process, input );
       
        // you could do other stuff whle working is doing its thing
        if( working.isCancelled() ){
            return;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.