Package org.apache.karaf.jpm
Interface ProcessBuilder
-
- All Known Implementing Classes:
ProcessBuilderImpl
public interface ProcessBuilderInterface used to create new processes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Processattach(int pid)Attach to an existing process.ProcessBuildercommand(String command)Set the command to execute.ProcessBuilderdirectory(File dir)Specify the current directory to run the command from.Processstart()Create and start the process.
-
-
-
Method Detail
-
directory
ProcessBuilder directory(File dir)
Specify the current directory to run the command from.- Parameters:
dir- The directory to run the command from.- Returns:
- The
ProcessBuilderinstance.
-
command
ProcessBuilder command(String command)
Set the command to execute.- Parameters:
command- The command to execute.- Returns:
- The
ProcessBuilderinstance.
-
start
Process start() throws IOException
Create and start the process.- Returns:
- The process that has been started.
- Throws:
IOException- If the process can not be created.
-
attach
Process attach(int pid) throws IOException
Attach to an existing process.- Parameters:
pid- The process PID to attach.- Returns:
- The process that has been attached.
- Throws:
IOException- if the process can not be attached to.
-
-