de.flapdoodle.embed.process.runtime
Class AbstractProcess<T extends ExecutableProcessConfig,E extends Executable<T,P>,P extends IStopable>
java.lang.Object
de.flapdoodle.embed.process.runtime.AbstractProcess<T,E,P>
- All Implemented Interfaces:
- IStopable
public abstract class AbstractProcess<T extends ExecutableProcessConfig,E extends Executable<T,P>,P extends IStopable>
- extends Object
- implements IStopable
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TIMEOUT
public static final int TIMEOUT
- See Also:
- Constant Field Values
AbstractProcess
public AbstractProcess(Distribution distribution,
T config,
IRuntimeConfig runtimeConfig,
E executable)
throws IOException
- Throws:
IOException
getConfig
public T getConfig()
onBeforeProcess
protected void onBeforeProcess(IRuntimeConfig runtimeConfig)
throws IOException
- Throws:
IOException
onBeforeProcessStart
protected void onBeforeProcessStart(ProcessBuilder processBuilder,
T config2,
IRuntimeConfig runtimeConfig)
onAfterProcessStart
protected void onAfterProcessStart(ProcessControl process,
IRuntimeConfig runtimeConfig)
throws IOException
- Throws:
IOException
getCommandLine
protected abstract List<String> getCommandLine(Distribution distribution,
T config,
File exe)
throws IOException
- Throws:
IOException
supportConfig
protected abstract ISupportConfig supportConfig()
stop
public abstract void stop()
- Specified by:
stop in interface IStopable
stopProcess
protected final void stopProcess()
waitFor
public int waitFor()
throws InterruptedException
- Throws:
InterruptedException
setProcessId
protected void setProcessId(int processId)
sendKillToProcess
protected boolean sendKillToProcess()
tryKillToProcess
protected boolean tryKillToProcess()
Copyright © 2012. All Rights Reserved.