|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.process.AbstractUniversalProcess
org.objectweb.proactive.core.process.AbstractExternalProcess
org.objectweb.proactive.core.process.JVMProcessImpl
The JVMProcess class is able to start localy any class of the ProActive library by creating a Java Virtual Machine.
For instance:
............. JVMProcessImpl process = new JVMProcessImpl(new StandardOutputMessageLogger()); process.setClassname("org.objectweb.proactive.core.node.StartNode"); process.setParameters("nodeName"); process.startProcess(); .............
This piece of code launches the ProActive java class org.objectweb.proactive.core.node.StartNode with nodeName as parameter.
Nested Class Summary |
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
AbstractExternalProcess.NullMessageLogger, AbstractExternalProcess.ProcessInputHandler, AbstractExternalProcess.ProcessOutputHandler, AbstractExternalProcess.SimpleMessageSink, AbstractExternalProcess.StandardOutputMessageLogger |
Field Summary | |
protected java.lang.String |
bootClasspath
|
protected java.lang.String |
classname
|
protected java.lang.String |
classpath
|
static java.lang.String |
DEFAULT_CLASSNAME
|
static java.lang.String |
DEFAULT_CLASSPATH
|
static java.lang.String |
DEFAULT_JAVAPATH
|
static java.lang.String |
DEFAULT_JVMPARAMETERS
|
static java.lang.String |
DEFAULT_LOG4J_FILE
|
static java.lang.String |
DEFAULT_POLICY_FILE
|
protected java.lang.String |
javaPath
|
protected java.lang.StringBuffer |
jvmParameters
|
protected java.lang.String |
log4jFile
|
protected java.util.ArrayList |
modifiedOptions
|
protected boolean |
overwrite
This attributes is used when this jvm extends another one. |
protected java.lang.StringBuffer |
parameters
|
protected java.lang.String |
policyFile
|
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
clogger, closeStream, errorMessageLogger, externalProcess, FILE_TRANSFER_DEFAULT_PROTOCOL, fileTransferLogger, inputMessageLogger, IS_WINDOWS_SYSTEM, NO_COMPOSITION, outputMessageSink |
Fields inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
certificateLocation, command, command_path, DEFAULT_HOSTNAME, DEFAULT_USERNAME, environment, hostname, isFinished, isStarted, LOCALHOST, privateKeyLocation, securityFile, username |
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
UNKNOWN_NODE_NUMBER |
Constructor Summary | |
JVMProcessImpl()
Creates a new JVMProcess Used with XML Descriptor |
|
JVMProcessImpl(RemoteProcessMessageLogger messageLogger)
Creates a new JVMProcess |
|
JVMProcessImpl(RemoteProcessMessageLogger inputMessageLogger,
RemoteProcessMessageLogger errorMessageLogger)
Creates a new JVMProcess |
Method Summary | |
protected java.lang.String |
buildCommand()
|
protected java.lang.String |
buildJavaCommand()
|
protected void |
changeSettings(JVMProcess jvmProcess)
|
java.lang.String |
getBootClasspath()
Returns the boot classpath associated to this process |
java.lang.String |
getClassname()
Returns the class name that this process is about to start |
java.lang.String |
getClasspath()
Returns the classpath associated to this process |
UniversalProcess |
getFinalProcess()
Returns the last process of the chain |
java.lang.String |
getJavaPath()
Returns the java path associated to this process. |
java.lang.String |
getJvmOptions()
Returns this jvm options |
java.lang.String |
getLog4jFile()
Returns the location of the log4j property file. |
int |
getNodeNumber()
Returns the number of nodes targeted |
java.lang.String |
getParameters()
Returns parameters associated to the class that this process is going to start |
java.lang.String |
getPolicyFile()
Returns the location (path) to the policy file |
java.lang.String |
getProcessId()
Returns the id of the process |
static void |
main(java.lang.String[] args)
|
void |
resetParameters()
Reset to empty value parameters associated to the class that this process is going to start |
void |
setBootClasspath(java.lang.String bootClasspath)
Sets the boot classpath associated to this process |
void |
setClassname(java.lang.String classname)
Sets the value of the class to start for this process |
void |
setClasspath(java.lang.String classpath)
Sets the classpath for this process |
void |
setExtendedJVM(JVMProcessImpl jvmProcess)
Allows this JVMProcess to extend another JVMProcessImpl. |
void |
setJavaPath(java.lang.String javaPath)
Sets the java path for this process |
void |
setJvmOptions(java.lang.String string)
Sets the options of the jvm to start For instance: jvmProcess.set JvmOptions("-verbose -Xms300M -Xmx300m"); |
void |
setLog4jFile(java.lang.String log4jFile)
Sets the location of the log4j property file. |
void |
setOverwrite(boolean overwrite)
Sets the overwrite attribute with the given value |
void |
setParameters(java.lang.String parameters)
Sets the parameters of the class to start with the given value |
void |
setPolicyFile(java.lang.String policyFile)
Sets the location of the policy file |
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
checkStarted, getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, pushProcessAttributes, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, toString, toString, waitFor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.process.ExternalProcess |
closeStream, getCompositionType, getErrorMessageLogger, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink |
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
getCommand, getCommandPath, getEnvironment, getHostname, getUsername, isFinished, isHierarchical, isStarted, setCommandPath, setEnvironment, setHostname, setUsername, startFileTransfer, startProcess, stopProcess, waitFor |
Field Detail |
public static final java.lang.String DEFAULT_CLASSPATH
public static final java.lang.String DEFAULT_JAVAPATH
public static java.lang.String DEFAULT_POLICY_FILE
public static java.lang.String DEFAULT_LOG4J_FILE
public static final java.lang.String DEFAULT_CLASSNAME
public static final java.lang.String DEFAULT_JVMPARAMETERS
protected java.lang.String classpath
protected java.lang.String bootClasspath
protected java.lang.String javaPath
protected java.lang.String policyFile
protected java.lang.String log4jFile
protected java.lang.String classname
protected java.lang.StringBuffer parameters
protected java.lang.StringBuffer jvmParameters
protected java.util.ArrayList modifiedOptions
protected boolean overwrite
Constructor Detail |
public JVMProcessImpl()
public JVMProcessImpl(RemoteProcessMessageLogger messageLogger)
messageLogger
- The logger that handles input and error stream of this processpublic JVMProcessImpl(RemoteProcessMessageLogger inputMessageLogger, RemoteProcessMessageLogger errorMessageLogger)
inputMessageLogger
- The logger that handles input stream of this processerrorMessageLogger
- The logger that handles error stream of this processMethod Detail |
public static void main(java.lang.String[] args)
public java.lang.String getClasspath()
JVMProcess
getClasspath
in interface JVMProcess
public void setClasspath(java.lang.String classpath)
JVMProcess
setClasspath
in interface JVMProcess
classpath
- The value of the classpath environment variablepublic void setBootClasspath(java.lang.String bootClasspath)
JVMProcess
setBootClasspath
in interface JVMProcess
bootClasspath
- The boot classpath of the java commandpublic java.lang.String getBootClasspath()
JVMProcess
getBootClasspath
in interface JVMProcess
public java.lang.String getJavaPath()
JVMProcess
getJavaPath
in interface JVMProcess
public void setJavaPath(java.lang.String javaPath)
JVMProcess
setJavaPath
in interface JVMProcess
javaPath
- The value of the path to execute 'java' commandpublic java.lang.String getPolicyFile()
JVMProcess
getPolicyFile
in interface JVMProcess
public void setPolicyFile(java.lang.String policyFile)
JVMProcess
setPolicyFile
in interface JVMProcess
policyFile
- The value of the path to the policy filepublic java.lang.String getLog4jFile()
JVMProcess
getLog4jFile
in interface JVMProcess
public void setLog4jFile(java.lang.String log4jFile)
JVMProcess
setLog4jFile
in interface JVMProcess
log4jFile
- The value of the path to the log4j property filepublic java.lang.String getClassname()
JVMProcess
getClassname
in interface JVMProcess
public void setClassname(java.lang.String classname)
JVMProcess
setClassname
in interface JVMProcess
classname
- The name of the class to startpublic java.lang.String getParameters()
JVMProcess
getParameters
in interface JVMProcess
public void resetParameters()
JVMProcess
resetParameters
in interface JVMProcess
public void setParameters(java.lang.String parameters)
JVMProcess
setParameters
in interface JVMProcess
parameters
- Paramaters to be given in order to start the classpublic void setJvmOptions(java.lang.String string)
JVMProcess
For instance:
jvmProcess.set JvmOptions("-verbose -Xms300M -Xmx300m");
setJvmOptions
in interface JVMProcess
string
- Options to be given in order to start the jvmpublic java.lang.String getJvmOptions()
JVMProcess
getJvmOptions
in interface JVMProcess
public java.lang.String getProcessId()
UniversalProcess
getProcessId
in interface UniversalProcess
UniversalProcess.getProcessId()
public int getNodeNumber()
UniversalProcess
getNodeNumber
in interface UniversalProcess
UniversalProcess.getNodeNumber()
public UniversalProcess getFinalProcess()
UniversalProcess
getFinalProcess
in interface UniversalProcess
UniversalProcess.getFinalProcess()
public void setOverwrite(boolean overwrite)
JVMProcess
setOverwrite
in interface JVMProcess
overwrite
- public void setExtendedJVM(JVMProcessImpl jvmProcess)
JVMProcess
setExtendedJVM
in interface JVMProcess
jvmProcess
- the extended jvmprotected java.lang.String buildCommand()
buildCommand
in class AbstractExternalProcess
protected java.lang.String buildJavaCommand()
protected void changeSettings(JVMProcess jvmProcess)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |