public class JarExecutionHandlerDefault extends Object implements JarExecutionHandler
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
JarExecutionHandlerDefault() |
| Modifier and Type | Method and Description |
|---|---|
Process |
getJarProcess()
The created process.
|
protected boolean |
isKillingRequested() |
void |
killJarProcess()
Kill the jar execution process.
|
void |
onException(Exception ex)
Called if an exception occured during the process
launch.
|
void |
onExit(int exitVal)
Called when the jar execution process exits
|
void |
setJarProcess(Process jarProcess)
Called when the process is created.
|
void |
setKillingRequested() |
void |
waitForPortOpen(String host,
int port,
int nbrTry,
int sleepMilliseconds)
Wait for the specified host:port to be listened to.
|
public Process getJarProcess()
JarExecutionHandlergetJarProcess in interface JarExecutionHandlerpublic void setJarProcess(Process jarProcess)
JarExecutionHandlersetJarProcess in interface JarExecutionHandlerprotected boolean isKillingRequested()
public void setKillingRequested()
public void waitForPortOpen(String host, int port, int nbrTry, int sleepMilliseconds)
PortNotOpenException - if the port is still not
reachable after "sleepMilliseconds" milliseconds.public void killJarProcess()
killJarProcess in interface JarExecutionHandlerpublic void onExit(int exitVal)
onExit in interface JarExecutionHandlerpublic void onException(Exception ex)
JarExecutionHandleronException in interface JarExecutionHandlerCopyright © 2019. All rights reserved.