Package io.apigee.trireme.core.internal

Examples of io.apigee.trireme.core.internal.StreamPiper


            } else if (STDIO_FD.equals(type)) {
                // Assuming fd is zero, read from stdin and set that up.
                if (getStdioFD(opts) != 0) {
                    throw new AssertionError("Only FDs 0, 1, and 2 supported");
                }
                StreamPiper piper = new StreamPiper(parent.runner.getStdin(), out, false);
                piper.start(parent.runner.getUnboundedPool());

            } else {
                throw Utils.makeError(cx, parent, "Trireme unsupported stdio type " + type);
            }
        }
View Full Code Here


            } else if (STDIO_IGNORE.equals(type)) {
                if (log.isDebugEnabled()) {
                    log.debug("Setting fd {} to discard all output", arg);
                }
                StreamPiper piper = new StreamPiper(in, new BitBucketOutputStream(), false);
                piper.start(parent.runner.getUnboundedPool());

            } else if (STDIO_FD.equals(type)) {
                StreamPiper piper;
                switch (getStdioFD(opts)) {
                case 1:
                    piper = new StreamPiper(in, parent.runner.getStdout(), false);
                    piper.start(parent.runner.getUnboundedPool());
                    break;
                case 2:
                    piper = new StreamPiper(in, parent.runner.getStderr(), false);
                    piper.start(parent.runner.getUnboundedPool());
                    break;
                default:
                    throw new AssertionError("Only FDs 0, 1, and 2 supported");
                }
            } else {
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.internal.StreamPiper

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.