public abstract class AbstractProcess<T extends ExecutableProcessConfig,E extends Executable<T,P>,P extends IStopable> extends Object implements IStopable
| Modifier and Type | Field and Description |
|---|---|
static int |
TIMEOUT |
| Constructor and Description |
|---|
AbstractProcess(Distribution distribution,
T config,
IRuntimeConfig runtimeConfig,
E executable) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract List<String> |
getCommandLine(Distribution distribution,
T config,
File exe) |
T |
getConfig() |
protected void |
onAfterProcessStart(ProcessControl process,
IRuntimeConfig runtimeConfig) |
protected void |
onBeforeProcess(IRuntimeConfig runtimeConfig) |
protected void |
onBeforeProcessStart(ProcessBuilder processBuilder,
T config2,
IRuntimeConfig runtimeConfig) |
protected boolean |
sendKillToProcess() |
protected void |
setProcessId(int processId) |
abstract void |
stop() |
protected void |
stopProcess() |
protected abstract ISupportConfig |
supportConfig() |
protected boolean |
tryKillToProcess() |
int |
waitFor() |
public static final int TIMEOUT
public AbstractProcess(Distribution distribution, T config, IRuntimeConfig runtimeConfig, E executable) throws IOException
IOExceptionpublic T getConfig()
protected void onBeforeProcess(IRuntimeConfig runtimeConfig) throws IOException
IOExceptionprotected void onBeforeProcessStart(ProcessBuilder processBuilder, T config2, IRuntimeConfig runtimeConfig)
protected void onAfterProcessStart(ProcessControl process, IRuntimeConfig runtimeConfig) throws IOException
IOExceptionprotected abstract List<String> getCommandLine(Distribution distribution, T config, File exe) throws IOException
IOExceptionprotected abstract ISupportConfig supportConfig()
protected final void stopProcess()
public int waitFor()
throws InterruptedException
InterruptedExceptionprotected void setProcessId(int processId)
protected boolean sendKillToProcess()
protected boolean tryKillToProcess()
Copyright © 2013. All Rights Reserved.