com.atlassian.bamboo.command
Class CommandExecuteStreamHandler

java.lang.Object
  extended by com.atlassian.bamboo.command.CommandExecuteStreamHandler
All Implemented Interfaces:
org.apache.tools.ant.taskdefs.ExecuteStreamHandler

public class CommandExecuteStreamHandler
extends java.lang.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
protected  BuildLogger buildLogger
           
protected  java.lang.Thread errorThread
           
protected  java.lang.Thread outputThread
           
protected  java.lang.String planKey
           
 
Constructor Summary
CommandExecuteStreamHandler(BuildLogger buildLogger, java.lang.String planKey)
           
 
Method Summary
 void setProcessErrorStream(java.io.InputStream inputStream)
          Process the commands error stream
 void setProcessInputStream(java.io.OutputStream outputStream)
          Handle the command's input stream - currently ignored
 void setProcessOutputStream(java.io.InputStream inputStream)
          Process the command output stream
 void start()
          Required by the intereface, but not implemented
 void stop()
          Stop the threads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

outputThread

protected java.lang.Thread outputThread

errorThread

protected java.lang.Thread errorThread

buildLogger

protected final BuildLogger buildLogger

planKey

protected final java.lang.String planKey
Constructor Detail

CommandExecuteStreamHandler

public CommandExecuteStreamHandler(BuildLogger buildLogger,
                                   java.lang.String planKey)
Method Detail

setProcessInputStream

public void setProcessInputStream(java.io.OutputStream outputStream)
                           throws java.io.IOException
Handle the command's input stream - currently ignored

Specified by:
setProcessInputStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Parameters:
outputStream - The output stream
Throws:
java.io.IOException - Failure

setProcessErrorStream

public void setProcessErrorStream(java.io.InputStream inputStream)
                           throws java.io.IOException
Process the commands error stream

Specified by:
setProcessErrorStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Parameters:
inputStream - The error stream
Throws:
java.io.IOException - Something went wrong

setProcessOutputStream

public void setProcessOutputStream(java.io.InputStream inputStream)
                            throws java.io.IOException
Process the command output stream

Specified by:
setProcessOutputStream in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Parameters:
inputStream - The data output from the command
Throws:
java.io.IOException - Something went wrong

start

public void start()
           throws java.io.IOException
Required by the intereface, but not implemented

Specified by:
start in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler
Throws:
java.io.IOException - Will never happen!

stop

public void stop()
Stop the threads

Specified by:
stop in interface org.apache.tools.ant.taskdefs.ExecuteStreamHandler


Copyright © 2011 Atlassian. All Rights Reserved.