|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.exec.ProcessManager
public abstract class ProcessManager
Provides a wrapper around a process, including the pid of the started process as well as other helpful information
| Nested Class Summary | |
|---|---|
static interface |
ProcessManager.Listener
Notification for Process termination |
| Constructor Summary | |
|---|---|
ProcessManager(Process process,
int pid)
Create a ProcessManager |
|
| Method Summary | |
|---|---|
abstract void |
destroy(boolean includeChildren)
Destroy the managed process |
int |
getPid()
Get the pid |
Process |
getProcess()
Get the Process the ProcessManager is managing |
abstract void |
manage()
Manage the Process |
protected void |
notifyOnTermination()
Notify all ProcessManager.Listeners of the process termination |
void |
registerListener(ProcessManager.Listener l)
Register a ProcessManager.Listener |
void |
unregisterListener(ProcessManager.Listener l)
Unregister a ProcessManager.Listener |
abstract void |
waitFor()
Waits for the process to exit |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcessManager(Process process,
int pid)
process - The Process the ProcessManager will managepid - The process ID of the started Process| Method Detail |
|---|
public Process getProcess()
public int getPid()
public void registerListener(ProcessManager.Listener l)
ProcessManager.Listener
l - The listener to registerpublic void unregisterListener(ProcessManager.Listener l)
ProcessManager.Listener
l - The listener to unregisterprotected void notifyOnTermination()
ProcessManager.Listeners of the process termination
public abstract void manage()
throws IOException
IOException - if the process management utility cannot be createdpublic abstract void destroy(boolean includeChildren)
includeChildren - If true, destroy all child processes asl well.
This method will look for all child processes that have a prent process
ID of the managed process and forcibly terminate them.public abstract void waitFor()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||