com.atlassian.bamboo.testutils
Class CommandExecutor

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

public class CommandExecutor
extends Object


Constructor Summary
CommandExecutor()
           
 
Method Summary
 ProcessDescriptor exec(String command)
          A naive exec method that splits the passed command at each space.
 ProcessDescriptor exec(String[] command)
           
 ProcessDescriptor exec(String[] command, File workingDirectory, long timeout)
           
 ProcessDescriptor startDaemon(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(String[] command,
                                     long timeout)
                              throws IOException
Throws:
IOException

stopDaemon

public void stopDaemon(ProcessDescriptor processDescriptor)
                throws InterruptedException
Throws:
InterruptedException

exec

public ProcessDescriptor exec(String[] command,
                              @Nullable
                              File workingDirectory,
                              long timeout)
                       throws IOException,
                              TimeoutException,
                              InterruptedException
Throws:
IOException
TimeoutException
InterruptedException

exec

public ProcessDescriptor exec(String[] command)
                       throws TimeoutException,
                              IOException,
                              InterruptedException
Throws:
TimeoutException
IOException
InterruptedException

exec

public ProcessDescriptor exec(String command)
                       throws TimeoutException,
                              IOException,
                              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:
TimeoutException
IOException
InterruptedException


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.