Examples of StreamRedirectThread


Examples of com.asakusafw.bulkloader.common.StreamRedirectThread

            @Override
            public Void call() throws Exception {
                LOG.info("TG-EXTRACTOR-12003", subcommand, info.getId(), info.getTableName());
                Process process = builder.start();
                try {
                    Thread stdout = new StreamRedirectThread(process.getInputStream(), System.out);
                    stdout.setDaemon(true);
                    stdout.start();
                    Thread stderr = new StreamRedirectThread(process.getErrorStream(), System.err);
                    stderr.setDaemon(true);
                    stderr.start();
                    stdout.join();
                    stderr.join();
                    int exitCode = process.waitFor();
                    if (exitCode != 0) {
                        throw new IOException(MessageFormat.format(
                                "Cache builder returns unexpected exit code: {0}",
                                exitCode));
View Full Code Here

Examples of com.asakusafw.bulkloader.common.StreamRedirectThread

            throw new IllegalArgumentException("in must not be null"); //$NON-NLS-1$
        }
        if (out == null) {
            throw new IllegalArgumentException("out must not be null"); //$NON-NLS-1$
        }
        Thread t = new StreamRedirectThread(in, out);
        t.setDaemon(true);
        t.start();
        synchronized (running) {
            running.add(t);
        }
    }
View Full Code Here

Examples of processing.app.exec.StreamRedirectThread

     * @param vm the VM
     */
    protected void redirectStreams(VirtualMachine vm) {
        MessageSiphon ms = new MessageSiphon(process.getErrorStream(), this);
        errThread = ms.getThread();
        outThread = new StreamRedirectThread("VM output reader", process.getInputStream(), System.out);
        errThread.start();
        outThread.start();
    }
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.