Package com.atlassian.bamboo.command
Class CommandExecuteStreamHandler
- java.lang.Object
-
- com.atlassian.bamboo.command.CommandExecuteStreamHandler
-
- All Implemented Interfaces:
org.apache.tools.ant.taskdefs.ExecuteStreamHandler
public class CommandExecuteStreamHandler extends Object implements org.apache.tools.ant.taskdefs.ExecuteStreamHandler
This class returns the contents of the output stream and error streams that resulted from executing a command line.
-
-
Field Summary
Fields Modifier and Type Field Description protected BuildLoggerbuildLoggerprotected ThreaderrorThreadprotected ThreadoutputThreadprotected StringplanKey
-
Constructor Summary
Constructors Constructor Description CommandExecuteStreamHandler(BuildLogger buildLogger, String planKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetProcessErrorStream(InputStream inputStream)Process the commands error streamvoidsetProcessInputStream(OutputStream outputStream)Handle the command's input stream - currently ignoredvoidsetProcessOutputStream(InputStream inputStream)Process the command output streamvoidstart()Required by the intereface, but not implementedvoidstop()Stop the threads
-
-
-
Field Detail
-
outputThread
protected Thread outputThread
-
errorThread
protected Thread errorThread
-
buildLogger
protected final BuildLogger buildLogger
-
planKey
protected final String planKey
-
-
Constructor Detail
-
CommandExecuteStreamHandler
public CommandExecuteStreamHandler(BuildLogger buildLogger, String planKey)
-
-
Method Detail
-
setProcessInputStream
public void setProcessInputStream(OutputStream outputStream) throws IOException
Handle the command's input stream - currently ignored- Specified by:
setProcessInputStreamin interfaceorg.apache.tools.ant.taskdefs.ExecuteStreamHandler- Parameters:
outputStream- The output stream- Throws:
IOException- Failure
-
setProcessErrorStream
public void setProcessErrorStream(InputStream inputStream) throws IOException
Process the commands error stream- Specified by:
setProcessErrorStreamin interfaceorg.apache.tools.ant.taskdefs.ExecuteStreamHandler- Parameters:
inputStream- The error stream- Throws:
IOException- Something went wrong
-
setProcessOutputStream
public void setProcessOutputStream(InputStream inputStream) throws IOException
Process the command output stream- Specified by:
setProcessOutputStreamin interfaceorg.apache.tools.ant.taskdefs.ExecuteStreamHandler- Parameters:
inputStream- The data output from the command- Throws:
IOException- Something went wrong
-
start
public void start() throws IOExceptionRequired by the intereface, but not implemented- Specified by:
startin interfaceorg.apache.tools.ant.taskdefs.ExecuteStreamHandler- Throws:
IOException- Will never happen!
-
stop
public void stop()
Stop the threads- Specified by:
stopin interfaceorg.apache.tools.ant.taskdefs.ExecuteStreamHandler
-
-