org.apache.karaf.jpm
Interface ProcessBuilder

All Known Implementing Classes:
ProcessBuilderImpl

public interface ProcessBuilder

Interface used to create new processes.


Method Summary
 Process attach(int pid)
          Attach to an existing process
 ProcessBuilder command(java.lang.String command)
          Set the command to execute
 ProcessBuilder directory(java.io.File dir)
          Specified the current directory to run the command from
 Process start()
          Create and start the process
 

Method Detail

directory

ProcessBuilder directory(java.io.File dir)
Specified the current directory to run the command from

Parameters:
dir - the directory to run the command from
Returns:
the ProcessBuilder instance

command

ProcessBuilder command(java.lang.String command)
Set the command to execute

Parameters:
command - the command to execute
Returns:
the ProcessBuilder instance

start

Process start()
              throws java.io.IOException
Create and start the process

Returns:
the process that has been started
Throws:
java.io.IOException - if the process can not be created

attach

Process attach(int pid)
               throws java.io.IOException
Attach to an existing process

Returns:
the process that has been attached
Throws:
java.io.IOException - if the process can not be attached to


Copyright © 2007-2011 Apache Software Foundation. All Rights Reserved.