|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectprotoj.core.internal.StartVmCommand
public final class StartVmCommand
A convenience class for creating a command that will start a virtual machine.
Use the constructors to specify the minimal and most widely anticipated
configuration and the initXXX methods for the less common
configuration options.
| Constructor Summary | |
|---|---|
StartVmCommand()
|
|
| Method Summary | |
|---|---|
void |
execute()
|
java.util.List<java.lang.String> |
getArgs()
|
int |
getDebugPort()
|
java.lang.String |
getDebugSuspend()
|
org.apache.tools.ant.taskdefs.Java |
getJavaTask()
|
java.util.List<java.lang.String> |
getJvmargs()
|
java.lang.String |
getMainClass()
|
java.lang.String |
getResult()
|
java.lang.String |
getStderr()
|
java.lang.String |
getStdout()
|
void |
initArgs(java.util.List<java.lang.String> args)
Invoke if any arguments to main are required. |
void |
initArgs(java.lang.String... args)
Invoke if any arguments to main are required. |
void |
initClasspath(ArgRunnable<org.apache.tools.ant.types.Path> config)
Invoke if the classpath should be configured. |
void |
initDebug(int port,
boolean suspend)
Invoke if debugging is required. |
void |
initFork(java.lang.String maxMemory,
boolean spawn)
Invoke this method if the virtual machine should fork. |
void |
initJvmargs(java.util.List<java.lang.String> jvmargs)
Invoke if any virtual machine arguments are required. |
void |
initJvmargs(java.lang.String... jvmargs)
Invoke if any virtual machine arguments are required. |
void |
initLocalJmx()
Invoke if local jmx connectivity is required. |
void |
initLogging(java.io.File logFile,
int level)
Enables logging to the specified log file at Project.MSG_INFO level. |
void |
initRemoteJmx(java.lang.Integer port)
Invoke if remote jmx connectivity is required. |
void |
initWeaving(java.io.File weaverJar)
Invoke if loadtime weaving is required. |
boolean |
isSuccess()
It only makes sense to call this method from a forked but non-spawned vm. |
void |
setMainClass(java.lang.String mainClass)
Sets the main class on the underlying ant task. |
java.lang.String |
toString()
|
void |
writeOutput()
When forking a vm, all the output from the forked vm seems to get buffered. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StartVmCommand()
| Method Detail |
|---|
public void setMainClass(java.lang.String mainClass)
mainClass -
public void initLogging(java.io.File logFile,
int level)
logFile -
public void initFork(java.lang.String maxMemory,
boolean spawn)
maxMemory - specify the maximum memory in the format used by the
javaTask toolspawn - whether or not the process should be spawned i.e. outlive the
start-vm processpublic void initArgs(java.lang.String... args)
args - public void initArgs(java.util.List<java.lang.String> args)
args - public void initJvmargs(java.lang.String... jvmargs)
jvmargs - public void initJvmargs(java.util.List<java.lang.String> jvmargs)
jvmargs - public void initClasspath(ArgRunnable<org.apache.tools.ant.types.Path> config)
Path instance,
they instead supply a ClasspathConfig instance containing
instructions on how to configure the path.
config -
public void initDebug(int port,
boolean suspend)
port - the port that will accept a debugger connectionsuspend - whether or not the virtual machine will suspend until a
debugger connection is madepublic void initWeaving(java.io.File weaverJar)
weaverJar - the location of the aspectj weaver librarypublic void initLocalJmx()
public void initRemoteJmx(java.lang.Integer port)
port - the port that the jmx agent will be listening for connections
onpublic java.lang.String getMainClass()
public java.lang.String getStdout()
public java.lang.String getStderr()
public java.lang.String getResult()
public org.apache.tools.ant.taskdefs.Java getJavaTask()
public java.lang.String getDebugSuspend()
public int getDebugPort()
public java.util.List<java.lang.String> getArgs()
public java.util.List<java.lang.String> getJvmargs()
public void execute()
public void writeOutput()
public boolean isSuccess()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||