public class DefaultProcessController extends java.lang.Object implements ProcessController
ProcessController which assumes a launch script which takes opertions as the first argument
such as for the Init Script Actions spec| Constructor and Description |
|---|
DefaultProcessController(int id,
ProcessConfig config,
java.util.concurrent.Executor executor,
java.io.File baseDir) |
| Modifier and Type | Method and Description |
|---|---|
int |
configure() |
java.io.File |
getBaseDir() |
java.util.concurrent.Executor |
getExecutor() |
protected java.lang.String |
getLaunchScript() |
java.lang.Integer |
getPid() |
int |
install() |
int |
kill() |
int |
restart() |
protected int |
runCommandLine(java.lang.String command)
Converts a space separated command line into a Command and executes it
|
protected int |
runConfigCommandValueOrLaunchScriptWith(java.lang.String command,
java.lang.String launchArgument) |
int |
start() |
int |
status() |
int |
stop() |
java.lang.String |
toString() |
int |
uninstall() |
public DefaultProcessController(int id,
ProcessConfig config,
java.util.concurrent.Executor executor,
java.io.File baseDir)
public java.lang.String toString()
toString in class java.lang.Objectpublic int install()
throws java.lang.InterruptedException,
java.io.IOException,
CommandFailedException
install in interface ProcessControllerjava.lang.InterruptedExceptionjava.io.IOExceptionCommandFailedExceptionpublic int uninstall()
uninstall in interface ProcessControllerpublic int start()
throws java.lang.Exception
start in interface ProcessControllerjava.lang.Exceptionpublic int stop()
throws java.lang.Exception
stop in interface ProcessControllerjava.lang.Exceptionpublic int kill()
throws java.lang.Exception
kill in interface ProcessControllerjava.lang.Exceptionpublic int restart()
throws java.lang.Exception
restart in interface ProcessControllerjava.lang.Exceptionpublic int status()
throws java.lang.Exception
status in interface ProcessControllerjava.lang.Exceptionpublic int configure()
throws java.lang.Exception
configure in interface ProcessControllerjava.lang.Exceptionpublic java.io.File getBaseDir()
public java.util.concurrent.Executor getExecutor()
public java.lang.Integer getPid()
throws java.io.IOException
getPid in interface ProcessControllerjava.io.IOExceptionprotected java.lang.String getLaunchScript()
protected int runConfigCommandValueOrLaunchScriptWith(java.lang.String command,
java.lang.String launchArgument)
throws java.lang.InterruptedException,
java.io.IOException,
CommandFailedException
java.lang.InterruptedExceptionjava.io.IOExceptionCommandFailedExceptionprotected int runCommandLine(java.lang.String command)
throws java.io.IOException,
java.lang.InterruptedException,
CommandFailedException
java.io.IOExceptionjava.lang.InterruptedExceptionCommandFailedExceptionCopyright © 2014 Red Hat. All Rights Reserved.