org.jboss.maven.shared.process
Class Executor

java.lang.Object
  extended by org.jboss.maven.shared.process.Executor

public class Executor
extends java.lang.Object

Responsible for performing system call executions and coordinating error checking, process I/O, etc.

Author:
Steve Ebersole

Constructor Summary
Executor()
           
 
Method Summary
static void execute(java.lang.String cmd)
          Shorthand for execute(String, java.io.OutputStream, java.io.OutputStream) using System.out and System.err for the process's stdout and errout, respectively.
static void execute(java.lang.String cmd, java.io.OutputStream out)
          Shorthand for execute(String, java.io.OutputStream, java.io.OutputStream) using System.err for the process's errout and the given out for its stdout.
static void execute(java.lang.String cmd, java.io.OutputStream out, java.io.OutputStream err)
          Perform the given cmd as a System call, piping the input of the resulting process to our System.in, its stdout to the given out stream and its errout to the given err stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executor

public Executor()
Method Detail

execute

public static void execute(java.lang.String cmd)
Shorthand for execute(String, java.io.OutputStream, java.io.OutputStream) using System.out and System.err for the process's stdout and errout, respectively.

Parameters:
cmd - The command to execute.

execute

public static void execute(java.lang.String cmd,
                           java.io.OutputStream out)
Shorthand for execute(String, java.io.OutputStream, java.io.OutputStream) using System.err for the process's errout and the given out for its stdout.

Parameters:
cmd - The command to execute.
out - The stream to which to pipe the process's stdout.

execute

public static void execute(java.lang.String cmd,
                           java.io.OutputStream out,
                           java.io.OutputStream err)
Perform the given cmd as a System call, piping the input of the resulting process to our System.in, its stdout to the given out stream and its errout to the given err stream.

Parameters:
cmd - The command to execute.
out - The stream to which to pipe the process's stdout.
err - The stream to which to pipe the process's errout.


Copyright © 2007-2008 JBoss, a division of Red Hat, Inc. All Rights Reserved.