Package jetbrains.buildServer
Class SimpleCommandLineProcessRunner
- java.lang.Object
-
- jetbrains.buildServer.SimpleCommandLineProcessRunner
-
public class SimpleCommandLineProcessRunner extends Object
User: Eugene.Petrenko Date: 16.10.2006 Time: 19:28:52
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleCommandLineProcessRunner.NoOutputTimeoutProcessRunCallbackAdapter
static class
SimpleCommandLineProcessRunner.NoOutputTimeoutRunCommandEventsAdapter
static interface
SimpleCommandLineProcessRunner.ProcessRunCallback
static class
SimpleCommandLineProcessRunner.ProcessRunCallbackAdapter
Deprecated.to be killed in TC 11; use RunCommandEventsAdapter insteadstatic interface
SimpleCommandLineProcessRunner.RunCommandEvents
static class
SimpleCommandLineProcessRunner.RunCommandEventsAdapter
-
Field Summary
Fields Modifier and Type Field Description static String
TEAMCITY_COMMANDLINE_STDSTREAMS_ENCODING
-
Method Summary
-
-
-
Field Detail
-
TEAMCITY_COMMANDLINE_STDSTREAMS_ENCODING
public static final String TEAMCITY_COMMANDLINE_STDSTREAMS_ENCODING
- See Also:
- Constant Field Values
-
-
Method Detail
-
runCommand
public static ExecResult runCommand(@NotNull GeneralCommandLine commandLine, @Nullable byte[] input)
Call to this method will dump all parameters to the LOG. UserunCommandSecure(com.intellij.execution.configurations.GeneralCommandLine, java.lang.String, byte[], jetbrains.buildServer.SimpleCommandLineProcessRunner.RunCommandEvents)
to provide custom command line string to be logged. UserunCommand(com.intellij.execution.configurations.GeneralCommandLine, byte[], jetbrains.buildServer.SimpleCommandLineProcessRunner.RunCommandEvents)
to provide custom silence timeout throughSimpleCommandLineProcessRunner.RunCommandEvents
. Default timeout value is 1 minute- Parameters:
commandLine
- command line to be executed.input
- input data:- the input data to pass to the starting process;
- null if no input right now but the input can appear later (the command runner will leave the input stream opened);
- an empty byte array if no input data and the input stream must be closed.
- Returns:
- ExecResult of the execution
-
runCommand
public static ExecResult runCommand(@NotNull GeneralCommandLine commandLine, @Nullable byte[] input, @NotNull SimpleCommandLineProcessRunner.RunCommandEvents eventHandler)
Call to this method will dump all parameters to the LOG. UserunCommandSecure(com.intellij.execution.configurations.GeneralCommandLine, java.lang.String, byte[], jetbrains.buildServer.SimpleCommandLineProcessRunner.RunCommandEvents)
to provide custom command line string to be logged. UseSimpleCommandLineProcessRunner.RunCommandEvents
to provide custom silence timeout.- Parameters:
commandLine
- configured command line to be executed.input
- input data:- the input data to pass to the starting process;
- null if no input right now but the input can appear later (the command runner will leave the input stream opened);
- an empty byte array if no input data and the input stream must be closed.
eventHandler
- process listener and set silence timeout.- Returns:
- ExecResult of the execution
-
runCommandSecure
public static ExecResult runCommandSecure(@NotNull GeneralCommandLine commandLine, @NotNull String commandLineToLog, @Nullable byte[] input, @NotNull SimpleCommandLineProcessRunner.RunCommandEvents eventHandler)
Same asrunCommand(com.intellij.execution.configurations.GeneralCommandLine, byte[], jetbrains.buildServer.SimpleCommandLineProcessRunner.RunCommandEvents)
, but logs the specified commandLineToLog.- Parameters:
commandLine
- configured command line to be executed.commandLineToLog
- text string to be loggedinput
- input data:- the input data to pass to the starting process;
- null if no input right now but the input can appear later (the command runner will leave the input stream opened);
- an empty byte array if no input data and the input stream must be closed.
eventHandler
- process listener.- Returns:
- ExecResult of the execution
-
runCommandSecure
public static ExecResult runCommandSecure(@NotNull GeneralCommandLine commandLine, @NotNull String commandLineToLog, @Nullable byte[] input, @NotNull SimpleCommandLineProcessRunner.RunCommandEvents eventHandler, @NotNull ByteArrayOutputStream stdoutBuffer, @NotNull ByteArrayOutputStream stderrBuffer)
-
getCharset
public static Charset getCharset(@NotNull GeneralCommandLine commandLine)
-
-