|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.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.StartNode"); process.setParameters("nodeName"); process.startProcess(); .............
This piece of code launches the ProActive java class org.objectweb.proactive.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 static org.apache.log4j.Logger |
logger
|
protected java.lang.StringBuffer |
parameters
|
protected java.lang.String |
policyFile
|
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess |
clogger, errorMessageLogger, externalProcess, inputMessageLogger, IS_WINDOWS_SYSTEM, outputMessageSink |
Fields inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
certificateLocation, command, DEFAULT_HOSTNAME, DEFAULT_USERNAME, environment, hostname, isFinished, isStarted, LOCALHOST, privateKeyLocation, securityFile, username |
Constructor Summary | |
JVMProcessImpl()
Creates a new JVMProcess Used with XML Descriptor |
|
JVMProcessImpl(MessageLogger messageLogger)
Creates a new JVMProcess |
|
JVMProcessImpl(MessageLogger inputMessageLogger,
MessageLogger errorMessageLogger)
Creates a new JVMProcess |
Method Summary | |
protected java.lang.String |
buildCommand()
|
protected java.lang.String |
buildJavaCommand()
|
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 |
java.lang.String |
getJavaPath()
Returns the java path associated to this process. |
java.lang.String |
getLog4jFile()
Returns the location of the log4j property file. |
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 |
static void |
main(java.lang.String[] args)
|
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 |
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 |
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.AbstractExternalProcess |
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, getErrorMessageLogger, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleOutput, handleProcess, internalStartProcess, internalStopProcess, internalWaitFor, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink |
Methods inherited from class org.objectweb.proactive.core.process.AbstractUniversalProcess |
checkStarted, getCertificateLocation, getCommand, getEnvironment, getHostname, getPrivateKeyLocation, getSecurityFile, getUsername, isFinished, isStarted, setCertificateLocation, setEnvironment, setHostname, setPrivateKeyLocation, setSecurityFile, setUsername, 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 |
getErrorMessageLogger, getInputMessageLogger, getOutputMessageSink, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink |
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
getCertificateLocation, getCommand, getEnvironment, getHostname, getPrivateKeyLocation, getSecurityFile, getUsername, isFinished, isStarted, setCertificateLocation, setEnvironment, setHostname, setPrivateKeyLocation, setSecurityFile, setUsername, startProcess, stopProcess, waitFor |
Field Detail |
protected static org.apache.log4j.Logger logger
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
Constructor Detail |
public JVMProcessImpl()
public JVMProcessImpl(MessageLogger messageLogger)
messageLogger
- The logger that handles input and error stream of this processpublic JVMProcessImpl(MessageLogger inputMessageLogger, MessageLogger 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
public 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 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 jvmprotected java.lang.String buildCommand()
buildCommand
in class AbstractExternalProcess
protected java.lang.String buildJavaCommand()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |