public class JavaRuntimeLauncher
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
JavaRuntimeLauncher.Exit |
| Constructor and Description |
|---|
JavaRuntimeLauncher(java.util.List<java.lang.String> pathJars)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
long |
getAllocatedMemoryInMB() |
java.lang.String[] |
getArguments() |
java.lang.String |
getClassPath() |
long |
getDurationMilli()
Returns how long the operation took to complete.
|
long |
getFrozenTime() |
java.io.PrintStream |
getPrintErr() |
java.io.PrintStream |
getPrintOut() |
boolean |
isKillRequested() |
JavaRuntimeLauncher.Exit |
launch(java.lang.Class mainClass,
java.lang.String... args)
Launches the class with the provided arguments.
|
protected void |
printBuffer(java.io.BufferedReader input,
java.io.PrintStream output) |
void |
requestKill() |
void |
setFrozenTime(long frozenTime)
Specifies the amount of time the process has to complete.
|
void |
setMemoryInMB(long memoryInMB)
Specifies the amount of memory the process will be allocated in megabytes
|
void |
setPrintErr(java.io.PrintStream err) |
void |
setPrintOut(java.io.PrintStream out) |
public JavaRuntimeLauncher(java.util.List<java.lang.String> pathJars)
pathJars - List of paths to all the jarspublic void setFrozenTime(long frozenTime)
frozenTime - time in millisecondspublic void setMemoryInMB(long memoryInMB)
memoryInMB - megabytespublic long getDurationMilli()
public JavaRuntimeLauncher.Exit launch(java.lang.Class mainClass, java.lang.String... args)
mainClass - Classargs - it's argumentsprotected void printBuffer(java.io.BufferedReader input,
java.io.PrintStream output)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getClassPath()
public long getAllocatedMemoryInMB()
public long getFrozenTime()
public java.lang.String[] getArguments()
public void requestKill()
public boolean isKillRequested()
public java.io.PrintStream getPrintOut()
public void setPrintOut(java.io.PrintStream out)
public java.io.PrintStream getPrintErr()
public void setPrintErr(java.io.PrintStream err)