Package io.apigee.trireme.core.internal.handles

Examples of io.apigee.trireme.core.internal.handles.JavaOutputStreamHandle


            if (STDIO_PIPE.equals(type)) {
                // Create a new handle that writes to the output stream.
                if (log.isDebugEnabled()) {
                    log.debug("Setting fd {} to output stream {}", arg, out);
                }
                JavaOutputStreamHandle streamHandle = new JavaOutputStreamHandle(out);
                Scriptable handle = createStreamHandle(cx, streamHandle);
                opts.put("handle", opts, handle);

            } else if (STDIO_IGNORE.equals(type)) {
                // Close the stream and do nothing
View Full Code Here


                }
                PipedInputStream pipeIn = new PipedInputStream(PROCESS_PIPE_SIZE);
                PipedOutputStream pipeOut = new PipedOutputStream(pipeIn);

                sandbox.setStdin(pipeIn);
                JavaOutputStreamHandle streamHandle = new JavaOutputStreamHandle(pipeOut);
                Scriptable handle = createStreamHandle(cx, streamHandle);
                opts.put("handle", opts, handle);

            } else if (STDIO_FD.equals(type)) {
                // Child will read directly from the stdin for this process.
View Full Code Here

            AbstractHandle streamHandle;
            if ((runner.getStdout() == System.out) && ConsoleHandle.isConsoleSupported()) {
                streamHandle = new ConsoleHandle(runner);
                return createConsoleHandle(cx, streamHandle);
            } else {
                streamHandle = new JavaOutputStreamHandle(runner.getStdout());
                return createStreamHandle(cx, streamHandle);
            }
        }
View Full Code Here

        @JSGetter("_stderrHandle")
        @SuppressWarnings("unused")
        public Object getStderrHandle()
        {
            Context cx = Context.getCurrentContext();
            JavaOutputStreamHandle streamHandle = new JavaOutputStreamHandle(runner.getStderr());
            return createStreamHandle(cx, streamHandle);
        }
View Full Code Here

TOP

Related Classes of io.apigee.trireme.core.internal.handles.JavaOutputStreamHandle

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.