Package org.apache.karaf.jpm.impl
Class ProcessBuilderImpl
- java.lang.Object
-
- org.apache.karaf.jpm.impl.ProcessBuilderImpl
-
- All Implemented Interfaces:
ProcessBuilder
public class ProcessBuilderImpl extends Object implements ProcessBuilder
-
-
Constructor Summary
Constructors Constructor Description ProcessBuilderImpl()
-
Method Summary
All Methods Instance Methods Concrete 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
public ProcessBuilder directory(File dir)
Description copied from interface:ProcessBuilderSpecify the current directory to run the command from.- Specified by:
directoryin interfaceProcessBuilder- Parameters:
dir- The directory to run the command from.- Returns:
- The
ProcessBuilderinstance.
-
command
public ProcessBuilder command(String command)
Description copied from interface:ProcessBuilderSet the command to execute.- Specified by:
commandin interfaceProcessBuilder- Parameters:
command- The command to execute.- Returns:
- The
ProcessBuilderinstance.
-
start
public Process start() throws IOException
Description copied from interface:ProcessBuilderCreate and start the process.- Specified by:
startin interfaceProcessBuilder- Returns:
- The process that has been started.
- Throws:
IOException- If the process can not be created.
-
attach
public Process attach(int pid) throws IOException
Description copied from interface:ProcessBuilderAttach to an existing process.- Specified by:
attachin interfaceProcessBuilder- Parameters:
pid- The process PID to attach.- Returns:
- The process that has been attached.
- Throws:
IOException- if the process can not be attached to.
-
-