Package com.sun.enterprise.util.io

Examples of com.sun.enterprise.util.io.StreamFlusher


    {
        process=Runtime.getRuntime().exec(cmd);
            //process = new ProcessBuilder(cmd).start();
           
        // start stream flusher to push output to parent streams and null.
        StreamFlusher sfErr=new StreamFlusher(process.getErrorStream(), System.err, null);
        sfErr.start();

        // set flusher on stdout also, if not could stop with too much output
        StreamFlusher sfOut=new StreamFlusher(process.getInputStream(), System.out);
        sfOut.start();
        try {
            // must sleep for a couple of seconds, so if there is a jvm startup error,
            //the parent process
            //is around to catch and report it when the process in executed in verbose mode.
            Thread.currentThread().sleep(5000);
View Full Code Here


                getLogger().log(Level.FINE, sb.toString());
            }
           
            Process process = Runtime.getRuntime().exec(command);
            IdentityManager.writeToOutputStream(process.getOutputStream());
            StreamFlusher sfOut =
                new StreamFlusher(process.getInputStream(), System.err);
            StreamFlusher sfErr =
                new StreamFlusher(process.getErrorStream(), System.err);
            sfOut.start();
            sfErr.start();
            iret=process.waitFor();

            // logs a severe msg when synchronization fails
            Level sLoglevel = Level.SEVERE;
            if (iret == 0) {
View Full Code Here

TOP

Related Classes of com.sun.enterprise.util.io.StreamFlusher

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.