commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sgoes...@apache.org
Subject svn commit: r951982 - /commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java
Date Sun, 06 Jun 2010 21:22:30 GMT
Author: sgoeschl
Date: Sun Jun  6 21:22:29 2010
New Revision: 951982

URL: http://svn.apache.org/viewvc?rev=951982&view=rev
Log:
[EXEC-42] improving javadoc

Modified:
    commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java

Modified: commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java
URL: http://svn.apache.org/viewvc/commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java?rev=951982&r1=951981&r2=951982&view=diff
==============================================================================
--- commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java (original)
+++ commons/proper/exec/trunk/src/main/java/org/apache/commons/exec/Executor.java Sun Jun
 6 21:22:29 2010
@@ -50,7 +50,7 @@ public interface Executor {
     int INVALID_EXITVALUE = 0xdeadbeef;
 
     /**
-     * Define the exit code of the process to considered
+     * Define the exit code of the process to be considered
      * successful.
      *
      * @param value the exit code representing successful execution
@@ -58,7 +58,7 @@ public interface Executor {
     void setExitValue(final int value);
 
     /**
-     * Define the exit code of the process to considered
+     * Define the exit code of the process to be considered
      * successful. The caller can pass one of the following values
      * <ul>
      *  <li>an array of exit values to be considered successful</li>
@@ -83,7 +83,7 @@ public interface Executor {
 
     /**
      * Get the StreamHandler used for providing input and
-     * retriving the output.
+     * retrieving the output.
      * 
      * @return the StreamHandler 
      */
@@ -91,9 +91,12 @@ public interface Executor {
 
     /**
      * Set the StreamHandler used for providing input and
-     * retriving the output.
+     * retrieving the output. If you don't provide a stream
+     * handler the executed process might block when writing
+     * to stdout and/or stderr (see {@link java.lang.Process
+     * Process}).
      *
-     * @param streamHandler the StreamHandler
+     * @param streamHandler the stream handler
      */
 
     void setStreamHandler(ExecuteStreamHandler streamHandler);
@@ -151,7 +154,9 @@ public interface Executor {
      *
      * @param command the command to execute
      * @return process exit value
-     * @throws ExecuteException execution of subprocess failed
+     * @throws ExecuteException execution of subprocess failed or the
+     *          subprocess returned a exit value indicating a failure
+     *          {@link Executor#setExitValue(int)}.
      */
     int execute(CommandLine command)
         throws ExecuteException, IOException;
@@ -163,7 +168,9 @@ public interface Executor {
      * @param environment The environment for the new process. If null, the
      *          environment of the current process is used.
      * @return process exit value
-     * @throws ExecuteException execution of subprocess failed
+     * @throws ExecuteException execution of subprocess failed or the
+     *          subprocess returned a exit value indicating a failure
+     *          {@link Executor#setExitValue(int)}.
      */
     int execute(CommandLine command, Map environment)
         throws ExecuteException, IOException;



Mime
View raw message