Class SpawnedVMSupport
- java.lang.Object
-
- org.apache.activemq.artemis.utils.SpawnedVMSupport
-
public class SpawnedVMSupport extends Object
-
-
Constructor Summary
Constructors Constructor Description SpawnedVMSupport()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
checkProcess()
Check if all spawned processes are finished.static void
enableCheck()
static void
forceKill()
static String
getClassPath()
static String
getClassPath(File libfolder)
static Process
spawnVM(String className, boolean logOutput, String... args)
static Process
spawnVM(String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args)
static Process
spawnVM(String className, String... args)
static Process
spawnVM(String className, String[] vmargs, boolean logOutput, String... args)
static Process
spawnVM(String className, String[] vmargs, String... args)
static Process
spawnVM(String classPath, String className, boolean logOutput, String... args)
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)
static Process
spawnVM(String classPath, String wordMatch, Runnable wordRunning, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args)
static Process
spawnVM(String classpath, String className, String[] vmargs, boolean logOutput, String... args)
static Process
spawnVM(String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args)
static Process
spawnVM(String classPath, String className, String memoryArg1, String memoryArg2, String[] vmargs, boolean logOutput, boolean logErrorOutput, String... args)
static Process
spawnVMWithLogMacher(String wordMatch, Runnable runnable, String className, String[] vmargs, boolean logOutput, String... args)
static void
startLogger(boolean print, String wordMatch, Runnable wordRunanble, String className, Process process)
static void
startLogger(String className, Process process)
-
-
-
Method Detail
-
spawnVM
public static Process spawnVM(String className, String... args) throws Exception
- Throws:
Exception
-
spawnVM
public static Process spawnVM(String className, boolean logOutput, String... args) throws Exception
- Throws:
Exception
-
spawnVM
public static Process spawnVM(String classPath, String className, boolean logOutput, String... args) throws Exception
- Throws:
Exception
-
spawnVM
public static Process spawnVM(String className, String[] vmargs, String... args) throws Exception
- 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:
IOException
ClassNotFoundException
-
getClassPath
public static String 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
- Parameters:
classPath
-wordMatch
-wordRunning
-className
-memoryArg1
-memoryArg2
-vmargs
-logOutput
-logErrorOutput
-debugPort
- if <=0 it means no debugargs
-- Returns:
- Throws:
IOException
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
- Parameters:
className
-process
-- Throws:
ClassNotFoundException
-
startLogger
public static void startLogger(String className, Process process) throws ClassNotFoundException
- Parameters:
className
-process
-- Throws:
ClassNotFoundException
-
-