org.apache.karaf.jpm.impl
Class ProcessImpl

java.lang.Object
  extended by org.apache.karaf.jpm.impl.ProcessImpl
All Implemented Interfaces:
java.io.Serializable, Process

public class ProcessImpl
extends java.lang.Object
implements Process

See Also:
Serialized Form

Constructor Summary
ProcessImpl(int pid)
           
 
Method Summary
static Process attach(int pid)
           
static Process create(java.io.File dir, java.lang.String command)
           
 void destroy()
          Destroy the process.
 int exitValue()
           
 int getPid()
          Retrieves the PID of the process
 boolean isRunning()
          Check if this process is still running
 int waitFor()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcessImpl

public ProcessImpl(int pid)
Method Detail

getPid

public int getPid()
Description copied from interface: Process
Retrieves the PID of the process

Specified by:
getPid in interface Process
Returns:
the pid

isRunning

public boolean isRunning()
                  throws java.io.IOException
Description copied from interface: Process
Check if this process is still running

Specified by:
isRunning in interface Process
Returns:
true if the process is running
Throws:
java.io.IOException - if an error occurs

destroy

public void destroy()
             throws java.io.IOException
Description copied from interface: Process
Destroy the process.

Specified by:
destroy in interface Process
Throws:
java.io.IOException

waitFor

public int waitFor()
            throws java.lang.InterruptedException
Throws:
java.lang.InterruptedException

exitValue

public int exitValue()

create

public static Process create(java.io.File dir,
                             java.lang.String command)
                      throws java.io.IOException
Throws:
java.io.IOException

attach

public static Process attach(int pid)
                      throws java.io.IOException
Throws:
java.io.IOException


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