Package com.sun.enterprise.util
Class ProcessExecutor
java.lang.Object
com.sun.enterprise.util.ProcessExecutor
Deprecated.
Use ProcessManager instead
- Version:
- 1.0
- Author:
- Kedar
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionProcessExecutor(String[] cmd) Deprecated.Creates new ProcessExecutorProcessExecutor(String[] cmd, long timeoutSeconds) Deprecated.Creates new ProcessExecutorProcessExecutor(String[] cmd, long timeoutSeconds, String[] inputLines) Deprecated.ProcessExecutor(String[] cmd, long timeoutSeconds, String[] inputLines, String[] env, File workingDir) Deprecated.Creates a newProcessExecutorthat executes the given command.ProcessExecutor(String[] cmd, String[] inputLines) Deprecated.Creates new ProcessExecutor -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute()Deprecated.String[]execute(boolean bReturnOutputLines) Deprecated.String[]execute(boolean bReturnOutputLines, boolean bStartUpTimeLimit) Deprecated.protected StringDeprecated.Allows a subclass to control the error message returned when a non-zero exit code is returned from a failed executionbooleanDeprecated.protected StringgetFileBuffer(File file) Deprecated.Returns the contents of a file as a String.Deprecated.Returns the last LAST_BYTES bytes in the error stream of last execution as a String, if the ProcessExecutor was configured properly.Deprecated.Returns the last LAST_BYTES bytes in the output stream of last execution as a String, if the ProcessExecutor was configured properly.protected StringDeprecated.intDeprecated.Get the exit value of the process executed.Deprecated.static voidDeprecated.voidDeprecated.voidsetExecutionRetentionFlag(boolean s) Deprecated.This is the setting after the fact that an instance of ProcessExecutor is created.voidsetVerbose(boolean verbose) Deprecated.
-
Field Details
-
kDefaultTimeoutMillis
public static final long kDefaultTimeoutMillisDeprecated.- See Also:
-
kSleepTime
public static final long kSleepTimeDeprecated.- See Also:
-
mCmdStrings
Deprecated. -
mOutFile
Deprecated. -
mErrFile
Deprecated.
-
-
Constructor Details
-
ProcessExecutor
Deprecated.Creates new ProcessExecutor -
ProcessExecutor
Deprecated.Creates new ProcessExecutor -
ProcessExecutor
Deprecated.Creates new ProcessExecutor -
ProcessExecutor
Deprecated. -
ProcessExecutor
public ProcessExecutor(String[] cmd, long timeoutSeconds, String[] inputLines, String[] env, File workingDir) Deprecated.Creates a newProcessExecutorthat executes the given command.- Parameters:
cmd- String that has command name and its command line argumentstimeoutSeconds- long integer timeout to be applied in seconds. After this time if the process to execute does not end, it will be destroyed.
-
-
Method Details
-
setExecutionRetentionFlag
public void setExecutionRetentionFlag(boolean s) Deprecated.This is the setting after the fact that an instance of ProcessExecutor is created. This is to be used in case the output and error of the last execute call has to be retained for latter analysis.- Parameters:
s- boolean representing whether to retain, true means the buffers will be retained, false otherwise.
-
getExecutionRetentionFlag
public boolean getExecutionRetentionFlag()Deprecated. -
getLastExecutionError
Deprecated.Returns the last LAST_BYTES bytes in the error stream of last execution as a String, if the ProcessExecutor was configured properly. It may return null if the retentionFlag is set to false. -
getLastExecutionOutput
Deprecated.Returns the last LAST_BYTES bytes in the output stream of last execution as a String, if the ProcessExecutor was configured properly. It may return null if the retentionFlag is set to false. -
execute
Deprecated.- Throws:
ExecException
-
execute
Deprecated.- Throws:
ExecException
-
getExceptionMessage
Deprecated.Allows a subclass to control the error message returned when a non-zero exit code is returned from a failed execution- Returns:
-
execute
Deprecated.- Throws:
ExecException
-
getProcessExitValue
public int getProcessExitValue()Deprecated.Get the exit value of the process executed. If this method is called before process execution is complete (i.e. before execute() method has returned, it will return -1. If sub process is terminated at timeout, the method will return -255 -
setVerbose
public void setVerbose(boolean verbose) Deprecated. -
getFileBuffer
Deprecated.Returns the contents of a file as a String. It never returns a null. If the file is empty, an empty string is returned.- Parameters:
file- the file to read
-
getLatestOutput
Deprecated. -
retainBuffers
public void retainBuffers()Deprecated. -
getSubProcess
Deprecated. -
main
Deprecated.
-