|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.exec.ProcessManager
org.rioproject.exec.support.PosixProcessManager
public class PosixProcessManager
A ProcessManager implementation for posix compliant systems
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.rioproject.exec.ProcessManager |
|---|
ProcessManager.Listener |
| Constructor Summary | |
|---|---|
PosixProcessManager(Process process,
int pid,
String stdOutFileName,
String stdErrFileName)
Create a PosixProcessManager |
|
| Method Summary | |
|---|---|
void |
destroy(boolean includeChildren)
Destroy the managed process |
void |
manage()
Manage the Process |
void |
setCommandFile(File commandFile)
Set the generated command file to delete |
void |
setCommandLine(String commandLine)
Set the command line that was executed |
void |
waitFor()
Waits for the process to exit |
| Methods inherited from class org.rioproject.exec.ProcessManager |
|---|
getPid, getProcess, notifyOnTermination, registerListener, unregisterListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PosixProcessManager(Process process,
int pid,
String stdOutFileName,
String stdErrFileName)
process - The Process the ProcessManager will managepid - The process ID of the started ProcessstdOutFileName - The file name to redirect standard output tostdErrFileName - The file name to redirect standard error to| Method Detail |
|---|
public void setCommandFile(File commandFile)
commandFile - The script that started the process this
process manager is managing. Upon exit, delete this filepublic void setCommandLine(String commandLine)
commandLine - The command line that was executed, and as a result
of it's execution this manager created. If set, this will be useful for
logging purposes.
public void manage()
throws IOException
manage in class ProcessManagerIOException - if the process management utility cannot be createdpublic void destroy(boolean includeChildren)
destroy in class ProcessManagerincludeChildren - If true, destroy all child processes as well.
This method will look for all child processes that have a parent process
ID of the managed process and forcibly terminate them.public void waitFor()
waitFor in class ProcessManager
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||