org.apache.sling.testing.tools.jarexec
Class JarExecutor
java.lang.Object
org.apache.sling.testing.tools.jarexec.JarExecutor
public class JarExecutor
- extends Object
Start a runnable jar by forking a JVM process,
and terminate the process when this VM exits.
|
Method Summary |
int |
getServerPort()
|
void |
start()
Start the jar if not done yet, and setup runtime hook
to stop it. |
void |
stop()
Stop the process that we started, if any, and wait for it to exit before returning |
String |
toString()
|
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
DEFAULT_EXIT_TIMEOUT
public static final int DEFAULT_EXIT_TIMEOUT
- See Also:
- Constant Field Values
DEFAULT_JAR_FOLDER
public static final String DEFAULT_JAR_FOLDER
- See Also:
- Constant Field Values
DEFAULT_JAR_NAME_REGEXP
public static final String DEFAULT_JAR_NAME_REGEXP
- See Also:
- Constant Field Values
PROP_PREFIX
public static final String PROP_PREFIX
- See Also:
- Constant Field Values
PROP_SERVER_PORT
public static final String PROP_SERVER_PORT
- See Also:
- Constant Field Values
PROP_JAR_FOLDER
public static final String PROP_JAR_FOLDER
- See Also:
- Constant Field Values
PROP_JAR_NAME_REGEXP
public static final String PROP_JAR_NAME_REGEXP
- See Also:
- Constant Field Values
PROP_VM_OPTIONS
public static final String PROP_VM_OPTIONS
- See Also:
- Constant Field Values
PROP_WORK_FOLDER
public static final String PROP_WORK_FOLDER
- See Also:
- Constant Field Values
PROP_JAR_OPTIONS
public static final String PROP_JAR_OPTIONS
- See Also:
- Constant Field Values
PROP_EXIT_TIMEOUT_SECONDS
public static final String PROP_EXIT_TIMEOUT_SECONDS
- See Also:
- Constant Field Values
JarExecutor
public JarExecutor(Properties config)
throws JarExecutor.ExecutorException
- Build a JarExecutor, locate the jar to run, etc
- Throws:
JarExecutor.ExecutorException
toString
public String toString()
- Overrides:
toString in class Object
getServerPort
public int getServerPort()
start
public void start()
throws Exception
- Start the jar if not done yet, and setup runtime hook
to stop it.
- Throws:
Exception
stop
public void stop()
- Stop the process that we started, if any, and wait for it to exit before returning
Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.