org.objectweb.proactive.core.process.rsh
Class RSHJVMProcess

java.lang.Object
  |
  +--org.objectweb.proactive.core.process.AbstractUniversalProcess
        |
        +--org.objectweb.proactive.core.process.AbstractExternalProcess
              |
              +--org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
                    |
                    +--org.objectweb.proactive.core.process.rsh.RSHProcess
                          |
                          +--org.objectweb.proactive.core.process.rsh.RSHJVMProcess
All Implemented Interfaces:
ExternalProcess, ExternalProcessDecorator, JVMProcess, java.io.Serializable, UniversalProcess
Direct Known Subclasses:
RSHNodeProcess

public class RSHJVMProcess
extends RSHProcess
implements JVMProcess

The RSHJVMProcess class is able to start any class, of the ProActive library, using rsh protocol. The difference between this class and RSHProcess class is that the target process for this class is automatically a JVMProcess, whereas for the RSHProcess, the target process has to be defined and can be any command and any process.

For instance:

 .......
 RSHProcess rsh = new RSHJVMProcess(new StandardOutputMessageLogger());
 rsh.setHostname("machine_name");
 rsh.startProcess();
 .....
 

This piece of code creates a new RSHJVMProcess. It allows to log on a remote machine with the rsh protocol and then, on this machine to create a Java Virtual Machine, by launching a ProActive java class.

Since:
ProActive 0.9.4
Version:
1.0, 2002/09/20
Author:
ProActive Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
AbstractExternalProcessDecorator.CompositeMessageLogger, AbstractExternalProcessDecorator.CompositeMessageSink
 
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
AbstractExternalProcess.NullMessageLogger, AbstractExternalProcess.ProcessInputHandler, AbstractExternalProcess.ProcessOutputHandler, AbstractExternalProcess.SimpleMessageSink, AbstractExternalProcess.StandardOutputMessageLogger
 
Field Summary
protected  JVMProcessImpl jvmProcess
           
 
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
targetProcess
 
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
 
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess
logger
 
Fields inherited from interface org.objectweb.proactive.core.process.ExternalProcessDecorator
APPEND_TO_COMMAND_COMPOSITION, GIVE_COMMAND_AS_PARAMETER, SEND_TO_OUTPUT_STREAM_COMPOSITION
 
Constructor Summary
RSHJVMProcess()
          Creates a new RSHJVMProcess Used with XML Descriptor
RSHJVMProcess(MessageLogger messageLogger)
          Creates a new RSHJVMProcess
RSHJVMProcess(MessageLogger inputMessageLogger, MessageLogger errorMessageLogger)
          Creates a new RSHJVMProcess
 
Method Summary
 java.lang.String getBootClasspath()
          Returns the boot classpath of the target JVMProcess
 java.lang.String getClassname()
          Returns the class name that the target JVMProcess is about to start
 java.lang.String getClasspath()
          Returns the classpath associated to the target JVMProcess
 java.lang.String getJavaPath()
          Returns the java path associated the target JVMProcess
 java.lang.String getLog4jFile()
          Returns the location of the log4j property file.
 java.lang.String getParameters()
          Returns parameters associated to the class that the target JVMProcess is going to start
 java.lang.String getPolicyFile()
          Returns the location (path) to the policy file for the target JVMProcess
static void main(java.lang.String[] args)
           
 void setBootClasspath(java.lang.String bootClasspath)
          Sets the boot classpath for the target JVMProcess
 void setClassname(java.lang.String classname)
          Sets the value of the class to start for the target JVMProcess
 void setClasspath(java.lang.String classpath)
          Sets the classpath for the target JVMProcess
 void setJavaPath(java.lang.String javaPath)
          Sets the java path for the target JVMProcess
 void setJvmOptions(java.lang.String parameters)
          Sets the parameters of the jvm to start with the given parameters for the target JVMProcess
 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 for the target JVMProcess
 void setPolicyFile(java.lang.String policyFile)
          Sets the location of the policy file for the target JVMProcess
 
Methods inherited from class org.objectweb.proactive.core.process.rsh.RSHProcess
buildRSHCommand, buildUnixRSHCommand, buildWindowsRSHCommand, internalBuildCommand
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
buildCommand, getCompositionType, getTargetProcess, handleOutput, internalStartProcess, setCompositionType, setTargetProcess, toString
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, getErrorMessageLogger, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, 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, 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

jvmProcess

protected JVMProcessImpl jvmProcess
Constructor Detail

RSHJVMProcess

public RSHJVMProcess()
Creates a new RSHJVMProcess Used with XML Descriptor


RSHJVMProcess

public RSHJVMProcess(MessageLogger messageLogger)
Creates a new RSHJVMProcess

Parameters:
messageLogger - The logger that handles input and error stream of the target JVMProcess

RSHJVMProcess

public RSHJVMProcess(MessageLogger inputMessageLogger,
                     MessageLogger errorMessageLogger)
Creates a new RSHJVMProcess

Parameters:
inputMessageLogger - The logger that handles input stream of the target JVMProcess
errorMessageLogger - The logger that handles error stream of the target JVMProcess
Method Detail

main

public static void main(java.lang.String[] args)

getClasspath

public java.lang.String getClasspath()
Returns the classpath associated to the target JVMProcess

Specified by:
getClasspath in interface JVMProcess
Returns:
String

setClasspath

public void setClasspath(java.lang.String classpath)
Sets the classpath for the target JVMProcess

Specified by:
setClasspath in interface JVMProcess
Parameters:
classpath - The value of the classpath environment variable

getJavaPath

public java.lang.String getJavaPath()
Returns the java path associated the target JVMProcess

Specified by:
getJavaPath in interface JVMProcess
Returns:
String The path to the java command

setJavaPath

public void setJavaPath(java.lang.String javaPath)
Sets the java path for the target JVMProcess

Specified by:
setJavaPath in interface JVMProcess
Parameters:
javaPath - The value of the path to execute 'java' command

getBootClasspath

public java.lang.String getBootClasspath()
Returns the boot classpath of the target JVMProcess

Specified by:
getBootClasspath in interface JVMProcess
Returns:
String the boot classpath of the java command

setBootClasspath

public void setBootClasspath(java.lang.String bootClasspath)
Sets the boot classpath for the target JVMProcess

Specified by:
setBootClasspath in interface JVMProcess
Parameters:
bootClasspath - The boot classpath of the java command

getPolicyFile

public java.lang.String getPolicyFile()
Returns the location (path) to the policy file for the target JVMProcess

Specified by:
getPolicyFile in interface JVMProcess
Returns:
String The path to the policy file

setPolicyFile

public void setPolicyFile(java.lang.String policyFile)
Sets the location of the policy file for the target JVMProcess

Specified by:
setPolicyFile in interface JVMProcess
Parameters:
policyFile - The value of the path to the policy file

getLog4jFile

public java.lang.String getLog4jFile()
Description copied from interface: JVMProcess
Returns the location of the log4j property file.

Specified by:
getLog4jFile in interface JVMProcess
Returns:
String the location of the log4j property file

setLog4jFile

public void setLog4jFile(java.lang.String log4jFile)
Description copied from interface: JVMProcess
Sets the location of the log4j property file.

Specified by:
setLog4jFile in interface JVMProcess

getClassname

public java.lang.String getClassname()
Returns the class name that the target JVMProcess is about to start

Specified by:
getClassname in interface JVMProcess
Returns:
String The value of the class that the target JVMProcess is going to start

setClassname

public void setClassname(java.lang.String classname)
Sets the value of the class to start for the target JVMProcess

Specified by:
setClassname in interface JVMProcess
Parameters:
classname - The name of the class to start

getParameters

public java.lang.String getParameters()
Returns parameters associated to the class that the target JVMProcess is going to start

Specified by:
getParameters in interface JVMProcess
Returns:
String The value of the parameters of the class

setParameters

public void setParameters(java.lang.String parameters)
Sets the parameters of the class to start with the given value for the target JVMProcess

Specified by:
setParameters in interface JVMProcess
Parameters:
parameters - Paramaters to be given in order to start the class

setJvmOptions

public void setJvmOptions(java.lang.String parameters)
Sets the parameters of the jvm to start with the given parameters for the target JVMProcess

Specified by:
setJvmOptions in interface JVMProcess
Parameters:
parameters - Paramaters to be given in order to start the jvm


Copyright © April 2004 INRIA All Rights Reserved.