com.atlassian.bamboo.testutils
Class CommandExecutor

java.lang.Object
  extended by com.atlassian.bamboo.testutils.CommandExecutor

public class CommandExecutor
extends java.lang.Object


Constructor Summary
CommandExecutor()
           
 
Method Summary
 ProcessDescriptor exec(java.lang.String command)
          A naive exec method that splits the passed command at each space.
 ProcessDescriptor exec(java.lang.String[] command)
           
 ProcessDescriptor exec(java.lang.String[] command, long timeout)
           
 ProcessDescriptor startDaemon(java.lang.String[] command, long timeout)
           
 void stopDaemon(ProcessDescriptor processDescriptor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandExecutor

public CommandExecutor()
Method Detail

startDaemon

public ProcessDescriptor startDaemon(java.lang.String[] command,
                                     long timeout)
                              throws java.io.IOException
Throws:
java.io.IOException

stopDaemon

public void stopDaemon(ProcessDescriptor processDescriptor)
                throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

exec

public ProcessDescriptor exec(java.lang.String[] command,
                              long timeout)
                       throws java.io.IOException,
                              java.util.concurrent.TimeoutException,
                              java.lang.InterruptedException
Throws:
java.io.IOException
java.util.concurrent.TimeoutException
java.lang.InterruptedException

exec

public ProcessDescriptor exec(java.lang.String[] command)
                       throws java.util.concurrent.TimeoutException,
                              java.io.IOException,
                              java.lang.InterruptedException
Throws:
java.util.concurrent.TimeoutException
java.io.IOException
java.lang.InterruptedException

exec

public ProcessDescriptor exec(java.lang.String command)
                       throws java.util.concurrent.TimeoutException,
                              java.io.IOException,
                              java.lang.InterruptedException
A naive exec method that splits the passed command at each space. Thus will break if any single value is a space

Parameters:
command -
Throws:
java.util.concurrent.TimeoutException
java.io.IOException
java.lang.InterruptedException


Copyright © 2012 Atlassian. All Rights Reserved.