Class SpawnedVMSupport
java.lang.Object
org.apache.activemq.artemis.utils.SpawnedVMSupport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanCheck if all spawned processes are finished.static voidstatic voidstatic Stringstatic StringgetClassPath(File libfolder) static voidspawnLoggers(String wordMatch, Runnable wordRunning, String className, boolean logOutput, boolean logErrorOutput, Process process) static Processstatic ProcessspawnVM(String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) static Processstatic Processstatic Processstatic Processstatic ProcessspawnVM(String classPath, String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, long debugPort, String... args) Spawns a VMstatic ProcessspawnVM(String classPath, String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) static Processstatic ProcessspawnVM(String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) static ProcessspawnVM(String classPath, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) static ProcessspawnVMWithLogMacher(String wordMatch, Runnable runnable, String className, String[] vmargs, boolean logOutput, String... args) static voidstartLogger(boolean print, String wordMatch, Runnable wordRunanble, String className, Process process) static voidstartLogger(String className, Process process)
-
Constructor Details
-
SpawnedVMSupport
public SpawnedVMSupport()
-
-
Method Details
-
spawnVM
- Throws:
Exception
-
spawnVM
- Throws:
Exception
-
spawnVM
public static Process spawnVM(String classPath, String className, boolean logOutput, String... args) throws Exception - Throws:
Exception
-
spawnVM
- Throws:
Exception
-
spawnVM
public static Process spawnVM(String className, String[] vmargs, boolean logOutput, String... args) throws Exception - Throws:
Exception
-
spawnVM
public static Process spawnVM(String classpath, String className, String[] vmargs, boolean logOutput, String... args) throws Exception - Throws:
Exception
-
spawnVMWithLogMacher
public static Process spawnVMWithLogMacher(String wordMatch, Runnable runnable, String className, String[] vmargs, boolean logOutput, String... args) throws Exception - Throws:
Exception
-
spawnVM
public static Process spawnVM(String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) throws Exception - Throws:
Exception
-
spawnVM
public static Process spawnVM(String classPath, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) throws Exception - Throws:
Exception
-
spawnVM
public static Process spawnVM(String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) throws Exception - Throws:
Exception
-
spawnVM
public static Process spawnVM(String classPath, String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args) throws IOException, ClassNotFoundException - Throws:
IOExceptionClassNotFoundException
-
getClassPath
-
getClassPath
-
spawnVM
public static Process spawnVM(String classPath, String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, long debugPort, String... args) throws IOException, ClassNotFoundException Spawns a VM- Parameters:
debugPort- if <=0 it means no debug Returns aProcessbased on the input parameters.- Throws:
IOExceptionClassNotFoundException
-
spawnLoggers
public static void spawnLoggers(String wordMatch, Runnable wordRunning, String className, boolean logOutput, boolean logErrorOutput, Process process) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
forceKill
public static void forceKill() -
enableCheck
public static void enableCheck() -
checkProcess
public static boolean checkProcess()Check if all spawned processes are finished. -
startLogger
public static void startLogger(boolean print, String wordMatch, Runnable wordRunanble, String className, Process process) throws ClassNotFoundException - Throws:
ClassNotFoundException
-
startLogger
- Throws:
ClassNotFoundException
-