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

java.lang.Object
  extended byorg.objectweb.proactive.core.process.AbstractUniversalProcess
      extended byorg.objectweb.proactive.core.process.AbstractExternalProcess
          extended byorg.objectweb.proactive.core.process.AbstractExternalProcessDecorator
              extended byorg.objectweb.proactive.core.process.rsh.RSHProcess
All Implemented Interfaces:
ExternalProcess, ExternalProcessDecorator, java.io.Serializable, UniversalProcess
Direct Known Subclasses:
RSHHierarchicalProcess, RSHJVMProcess

public class RSHProcess
extends AbstractExternalProcessDecorator

The RSHProcess class is able to start any class, of the ProActive library, using rsh protocol.

For instance:

 ..........
 RSHProcess rsh = new RSHProcess(new SimpleExternalProcess("ls -lsa"));
 rsh.setHostname("hostname.domain.fr");
 rsh.startProcess();
 .......... or
 RSHProcess rsh = new RSHProcess(new JVMProcessImpl(new StandardOutputMessageLogger()));
 ssh.setHostname("hostname.domain.fr");
 ssh.startProcess();
 .....
 

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
static java.lang.String DEFAULT_RSH_COPYPROTOCOL
           
static java.lang.String DEFAULT_RSHPATH
           
 
Fields inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
targetProcess
 
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.ExternalProcessDecorator
APPEND_TO_COMMAND_COMPOSITION, COPY_FILE_AND_APPEND_COMMAND, GIVE_COMMAND_AS_PARAMETER, SEND_TO_OUTPUT_STREAM_COMPOSITION
 
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess
logger, UNKNOWN_NODE_NUMBER
 
Constructor Summary
RSHProcess()
          Creates a new RSHProcess Used with XML Descriptors
RSHProcess(ExternalProcess targetProcess)
          Creates a new RSHProcess
 
Method Summary
protected  java.lang.String buildRSHCommand()
           
protected  java.lang.String buildUnixRSHCommand()
           
protected  java.lang.String buildWindowsRSHCommand()
           
 UniversalProcess getFinalProcess()
          Returns the last process of the chain
 int getNodeNumber()
          Returns the number of nodes targeted
 java.lang.String getProcessId()
          Returns the id of the process
protected  java.lang.String internalBuildCommand()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
buildCommand, getCompositionType, getTargetProcess, handleCopyFile, handleOutput, internalStartProcess, setCompositionType, setTargetProcess, toString
 
Methods inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
buildEnvironmentCommand, buildUnixEnvironmentCommand, buildWindowsEnvironmentCommand, closeStream, getErrorMessageLogger, getFileTransferDefaultCopyProtocol, getFileTransferWorkShopDeploy, getFileTransferWorkShopRetrieve, getInputMessageLogger, getOutputMessageSink, handleError, handleInput, handleProcess, internalFileTransferDefaultProtocol, internalStartFileTransfer, internalStopProcess, internalWaitFor, setErrorMessageLogger, setInputMessageLogger, setOutputMessageSink
 
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, 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, 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

DEFAULT_RSHPATH

public static final java.lang.String DEFAULT_RSHPATH
See Also:
Constant Field Values

DEFAULT_RSH_COPYPROTOCOL

public static final java.lang.String DEFAULT_RSH_COPYPROTOCOL
See Also:
Constant Field Values
Constructor Detail

RSHProcess

public RSHProcess()
Creates a new RSHProcess Used with XML Descriptors


RSHProcess

public RSHProcess(ExternalProcess targetProcess)
Creates a new RSHProcess

Parameters:
targetProcess - The target process associated to this process. The target process represents the process that will be launched after logging remote host with rsh protocol
Method Detail

getProcessId

public java.lang.String getProcessId()
Description copied from interface: UniversalProcess
Returns the id of the process

Returns:
the id of the process. This id is just the first letters of the process class, to be able to identify the sequence of processes used
See Also:
UniversalProcess.getProcessId()

getNodeNumber

public int getNodeNumber()
Description copied from interface: UniversalProcess
Returns the number of nodes targeted

Returns:
the number of nodes targeted. Represents the number of nodes expected to use when starting this process. If this number cannot be known, waiting for all available nodes for example, UNKNOWN_NODE_NUMBER is returned.
See Also:
UniversalProcess.getNodeNumber()

getFinalProcess

public UniversalProcess getFinalProcess()
Description copied from interface: UniversalProcess
Returns the last process of the chain

Returns:
the last process of the chain
See Also:
UniversalProcess.getFinalProcess()

main

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

internalBuildCommand

protected java.lang.String internalBuildCommand()
Specified by:
internalBuildCommand in class AbstractExternalProcessDecorator

buildRSHCommand

protected java.lang.String buildRSHCommand()

buildUnixRSHCommand

protected java.lang.String buildUnixRSHCommand()

buildWindowsRSHCommand

protected java.lang.String buildWindowsRSHCommand()


Copyright 2001-2005 INRIA All Rights Reserved.