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 specConstructor and Description |
---|
DefaultProcessController(int id,
ProcessConfig config,
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.io.File baseDir)
public java.lang.String toString()
toString
in class java.lang.Object
public int install() throws java.lang.InterruptedException, java.io.IOException, CommandFailedException
install
in interface ProcessController
java.lang.InterruptedException
java.io.IOException
CommandFailedException
public int uninstall()
uninstall
in interface ProcessController
public int start() throws java.lang.Exception
start
in interface ProcessController
java.lang.Exception
public int stop() throws java.lang.Exception
stop
in interface ProcessController
java.lang.Exception
public int kill() throws java.lang.Exception
kill
in interface ProcessController
java.lang.Exception
public int restart() throws java.lang.Exception
restart
in interface ProcessController
java.lang.Exception
public int status() throws java.lang.Exception
status
in interface ProcessController
java.lang.Exception
public int configure() throws java.lang.Exception
configure
in interface ProcessController
java.lang.Exception
public java.io.File getBaseDir()
public java.util.concurrent.Executor getExecutor()
public java.lang.Integer getPid() throws java.io.IOException
getPid
in interface ProcessController
java.io.IOException
protected 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.InterruptedException
java.io.IOException
CommandFailedException
protected int runCommandLine(java.lang.String command) throws java.io.IOException, java.lang.InterruptedException, CommandFailedException
java.io.IOException
java.lang.InterruptedException
CommandFailedException
Copyright © 2014 Red Hat. All Rights Reserved.