|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectorg.codehaus.groovy.grails.cli.fork.ForkedGrailsProcess
abstract class ForkedGrailsProcess extends java.lang.Object
Helper class for kicking off forked JVM processes, helpful in managing the setup and execution of the forked process. Subclasses should provided a static void main method.
Nested Class Summary | |
---|---|
static class |
ForkedGrailsProcess.TextDumper
|
Field Summary | |
---|---|
static java.lang.String |
DEBUG_FORK
|
static int |
DEFAULT_DAEMON_PORT
|
static java.lang.String |
DEFAULT_DEBUG_ARGS
|
Property Summary | |
---|---|
boolean |
daemon
|
int |
daemonPort
|
boolean |
debug
|
java.lang.String |
debugArgs
|
java.lang.String |
encoding
|
ExecutionContext |
executionContext
|
boolean |
forkReserve
|
java.net.URLClassLoader |
forkedClassLoader
|
java.util.List |
jvmArgs
|
int |
maxMemory
|
int |
maxPerm
|
int |
minMemory
|
boolean |
reloading
|
java.io.File |
reloadingAgent
|
Constructor Summary | |
ForkedGrailsProcess()
|
Method Summary | |
---|---|
protected java.lang.Process
|
attachOutputListener(java.lang.Process process, boolean async = false)
|
protected java.util.List
|
buildMinimalIsolatedClasspath(BuildSettings buildSettings)
|
protected java.util.List
|
buildProcessCommand(ExecutionContext executionContext, java.lang.String classpathString, boolean isReserve = false, boolean isDaemon = false)
|
void
|
configure(java.util.Map forkConfig)
|
protected void
|
configureFork(BuildSettings buildSettings)
|
protected groovy.lang.GroovyClassLoader
|
createClassLoader(BuildSettings buildSettings)
|
protected void
|
discoverAndSetAgent(ExecutionContext executionContext)
|
protected java.io.File
|
findJarFile(java.lang.Class targetClass)
|
java.util.Collection
|
findSystemClasspathJars(BuildSettings buildSettings)
|
protected java.io.File
|
findToolsJar()
|
java.lang.Process
|
fork(java.util.Map argsMap = new LinkedHashMap()
|
void
|
forkDaemon(ExecutionContext executionContext = getExecutionContext()
|
void
|
forkReserve(ExecutionContext executionContext = getExecutionContext()
|
protected void
|
forkReserveProcess(java.util.List cmd, ExecutionContext executionContext, boolean attachListener = true)
|
protected java.lang.String
|
getBoostrapClasspath(ExecutionContext executionContext)
|
protected java.io.File
|
getResumeDir()
|
protected BuildSettings
|
initializeBuildSettings(ExecutionContext ec)
|
protected java.net.URLClassLoader
|
initializeClassLoader(BuildSettings buildSettings)
|
protected void
|
initializeLogging(java.io.File grailsHome, java.lang.ClassLoader classLoader)
|
protected boolean
|
isDaemonProcess()
|
boolean
|
isDaemonRunning()
|
protected boolean
|
isDebugForkEnabled()
|
boolean
|
isForkingReserveEnabled()
|
protected boolean
|
isReserveProcess()
|
protected boolean
|
isWindows()
|
void
|
killAfterTimeout()
|
ExecutionContext
|
readExecutionContext()
|
protected ExecutionContext
|
readExecutionContext(java.lang.String location)
|
static java.lang.String
|
readLine(java.io.InputStream inputStream)
|
void
|
restartDaemon(ExecutionContext executionContext = getExecutionContext()
|
protected void
|
runDaemonCommand(java.lang.String daemonCmd)
|
protected void
|
setupReloading(java.net.URLClassLoader classLoader, BuildSettings buildSettings)
@param classLoader |
protected boolean
|
shouldRunWithDaemon()
|
void
|
startDaemon(groovy.lang.Closure callable)
|
protected void
|
startProjectWatcher(java.net.URLClassLoader classLoader, BuildSettings buildSettings)
|
protected java.io.File
|
storeExecutionContext(ExecutionContext executionContext)
|
protected void
|
waitForResume()
|
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Field Detail |
---|
public static final java.lang.String DEBUG_FORK
public static final int DEFAULT_DAEMON_PORT
public static final java.lang.String DEFAULT_DEBUG_ARGS
Property Detail |
---|
boolean daemon
int daemonPort
boolean debug
java.lang.String debugArgs
java.lang.String encoding
ExecutionContext executionContext
boolean forkReserve
java.net.URLClassLoader forkedClassLoader
java.util.List jvmArgs
int maxMemory
int maxPerm
int minMemory
boolean reloading
java.io.File reloadingAgent
Constructor Detail |
---|
ForkedGrailsProcess()
Method Detail |
---|
@groovy.transform.CompileStatic protected java.lang.Process attachOutputListener(java.lang.Process process, boolean async = false)
@groovy.transform.CompileStatic protected java.util.List buildMinimalIsolatedClasspath(BuildSettings buildSettings)
@groovy.transform.CompileStatic protected java.util.List buildProcessCommand(ExecutionContext executionContext, java.lang.String classpathString, boolean isReserve = false, boolean isDaemon = false)
@groovy.transform.CompileStatic void configure(java.util.Map forkConfig)
protected void configureFork(BuildSettings buildSettings)
@groovy.transform.CompileStatic protected groovy.lang.GroovyClassLoader createClassLoader(BuildSettings buildSettings)
@groovy.transform.CompileStatic protected void discoverAndSetAgent(ExecutionContext executionContext)
@groovy.transform.CompileStatic protected java.io.File findJarFile(java.lang.Class targetClass)
@groovy.transform.CompileStatic java.util.Collection findSystemClasspathJars(BuildSettings buildSettings)
@groovy.transform.CompileStatic protected java.io.File findToolsJar()
@groovy.transform.CompileStatic java.lang.Process fork(java.util.Map argsMap = new LinkedHashMap()
@groovy.transform.CompileStatic void forkDaemon(ExecutionContext executionContext = getExecutionContext()
@groovy.transform.CompileStatic void forkReserve(ExecutionContext executionContext = getExecutionContext()
@groovy.transform.CompileStatic protected void forkReserveProcess(java.util.List cmd, ExecutionContext executionContext, boolean attachListener = true)
@groovy.transform.CompileStatic protected java.lang.String getBoostrapClasspath(ExecutionContext executionContext)
protected java.io.File getResumeDir()
@groovy.transform.CompileStatic protected BuildSettings initializeBuildSettings(ExecutionContext ec)
@groovy.transform.CompileStatic protected java.net.URLClassLoader initializeClassLoader(BuildSettings buildSettings)
protected void initializeLogging(java.io.File grailsHome, java.lang.ClassLoader classLoader)
protected boolean isDaemonProcess()
boolean isDaemonRunning()
@groovy.transform.CompileStatic protected boolean isDebugForkEnabled()
@groovy.transform.CompileStatic boolean isForkingReserveEnabled()
protected boolean isReserveProcess()
@groovy.transform.CompileStatic protected boolean isWindows()
@groovy.transform.CompileStatic void killAfterTimeout()
@groovy.transform.CompileStatic ExecutionContext readExecutionContext()
@groovy.transform.CompileStatic protected ExecutionContext readExecutionContext(java.lang.String location)
@groovy.transform.CompileStatic static java.lang.String readLine(java.io.InputStream inputStream)
@groovy.transform.CompileStatic void restartDaemon(ExecutionContext executionContext = getExecutionContext()
@groovy.transform.CompileStatic protected void runDaemonCommand(java.lang.String daemonCmd)
protected void setupReloading(java.net.URLClassLoader classLoader, BuildSettings buildSettings)
@groovy.transform.CompileStatic protected boolean shouldRunWithDaemon()
@groovy.transform.CompileStatic void startDaemon(groovy.lang.Closure callable)
protected void startProjectWatcher(java.net.URLClassLoader classLoader, BuildSettings buildSettings)
protected java.io.File storeExecutionContext(ExecutionContext executionContext)
@groovy.transform.CompileStatic protected void waitForResume()
Groovy Documentation