org.apache.karaf.jpm.impl
Class ProcessBuilderImpl

java.lang.Object
  extended by org.apache.karaf.jpm.impl.ProcessBuilderImpl
All Implemented Interfaces:
ProcessBuilder

public class ProcessBuilderImpl
extends java.lang.Object
implements ProcessBuilder


Constructor Summary
ProcessBuilderImpl()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessBuilderImpl

public ProcessBuilderImpl()
Method Detail

directory

public ProcessBuilder directory(java.io.File dir)
Description copied from interface: ProcessBuilder
Specified the current directory to run the command from

Specified by:
directory in interface ProcessBuilder
Parameters:
dir - the directory to run the command from
Returns:
the ProcessBuilder instance

command

public ProcessBuilder command(java.lang.String command)
Description copied from interface: ProcessBuilder
Set the command to execute

Specified by:
command in interface ProcessBuilder
Parameters:
command - the command to execute
Returns:
the ProcessBuilder instance

start

public Process start()
              throws java.io.IOException
Description copied from interface: ProcessBuilder
Create and start the process

Specified by:
start in interface ProcessBuilder
Returns:
the process that has been started
Throws:
java.io.IOException - if the process can not be created

attach

public Process attach(int pid)
               throws java.io.IOException
Description copied from interface: ProcessBuilder
Attach to an existing process

Specified by:
attach in interface ProcessBuilder
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.