org.objectweb.proactive.core.process
Class AbstractExternalProcessDecorator

java.lang.Object
  |
  +--org.objectweb.proactive.core.process.AbstractUniversalProcess
        |
        +--org.objectweb.proactive.core.process.AbstractExternalProcess
              |
              +--org.objectweb.proactive.core.process.AbstractExternalProcessDecorator
All Implemented Interfaces:
ExternalProcess, ExternalProcessDecorator, java.io.Serializable, UniversalProcess
Direct Known Subclasses:
GlobusProcess, LSFBSubProcess, MapRshProcess, PrunSubProcess, RLoginProcess, RSHProcess, SSHProcess

public abstract class AbstractExternalProcessDecorator
extends AbstractExternalProcess
implements ExternalProcessDecorator

See Also:
Serialized Form

Nested Class Summary
static class AbstractExternalProcessDecorator.CompositeMessageLogger
          Implementation of a MessageLogger that feeds two MessageLoggers
static class AbstractExternalProcessDecorator.CompositeMessageSink
          Implementation of a MessageSink that can receive one message at a time
 
Nested classes inherited from class org.objectweb.proactive.core.process.AbstractExternalProcess
AbstractExternalProcess.NullMessageLogger, AbstractExternalProcess.ProcessInputHandler, AbstractExternalProcess.ProcessOutputHandler, AbstractExternalProcess.SimpleMessageSink, AbstractExternalProcess.StandardOutputMessageLogger
 
Field Summary
protected  ExternalProcess 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.ExternalProcessDecorator
APPEND_TO_COMMAND_COMPOSITION, GIVE_COMMAND_AS_PARAMETER, SEND_TO_OUTPUT_STREAM_COMPOSITION
 
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess
logger
 
Constructor Summary
AbstractExternalProcessDecorator()
           
AbstractExternalProcessDecorator(ExternalProcess targetProcess)
           
AbstractExternalProcessDecorator(ExternalProcess targetProcess, int compositionType)
           
 
Method Summary
protected  java.lang.String buildCommand()
           
 int getCompositionType()
          Returns the type of composition that occurs between the commands of two processes.
 ExternalProcess getTargetProcess()
          Returns the process target of this process.
protected  void handleOutput(java.io.BufferedWriter out)
           
protected abstract  java.lang.String internalBuildCommand()
           
protected  void internalStartProcess(java.lang.String command)
           
 void setCompositionType(int compositionType)
          Sets the type of composition that occurs between the commands of two processes.
 void setTargetProcess(ExternalProcess targetProcess)
          Sets the process target of this process.
protected  void toString(java.lang.StringBuffer sb)
           
 
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

targetProcess

protected ExternalProcess targetProcess
Constructor Detail

AbstractExternalProcessDecorator

public AbstractExternalProcessDecorator()

AbstractExternalProcessDecorator

public AbstractExternalProcessDecorator(ExternalProcess targetProcess)

AbstractExternalProcessDecorator

public AbstractExternalProcessDecorator(ExternalProcess targetProcess,
                                        int compositionType)
Method Detail

getTargetProcess

public ExternalProcess getTargetProcess()
Description copied from interface: ExternalProcessDecorator
Returns the process target of this process. The target process is embedded inside the current process.

Specified by:
getTargetProcess in interface ExternalProcessDecorator
Returns:
the process target of this process

setTargetProcess

public void setTargetProcess(ExternalProcess targetProcess)
Description copied from interface: ExternalProcessDecorator
Sets the process target of this process. The target process is embedded inside the current process.

Specified by:
setTargetProcess in interface ExternalProcessDecorator
Parameters:
targetProcess - the process target of this process

getCompositionType

public int getCompositionType()
Description copied from interface: ExternalProcessDecorator
Returns the type of composition that occurs between the commands of two processes. Type are APPEND_TO_COMMAND_COMPOSITION or SEND_TO_OUTPUT_STREAM_COMPOSITION.

Specified by:
getCompositionType in interface ExternalProcessDecorator
Returns:
the type of composition that occurs between the commands of two processes

setCompositionType

public void setCompositionType(int compositionType)
Description copied from interface: ExternalProcessDecorator
Sets the type of composition that occurs between the commands of two processes. Type are APPEND_TO_COMMAND_COMPOSITION or SEND_TO_OUTPUT_STREAM_COMPOSITION.

Specified by:
setCompositionType in interface ExternalProcessDecorator
Parameters:
compositionType - the type of composition that occurs between the commands of two processes

toString

protected void toString(java.lang.StringBuffer sb)
Overrides:
toString in class AbstractUniversalProcess

buildCommand

protected java.lang.String buildCommand()
Specified by:
buildCommand in class AbstractExternalProcess

internalBuildCommand

protected abstract java.lang.String internalBuildCommand()

internalStartProcess

protected void internalStartProcess(java.lang.String command)
                             throws java.io.IOException
Overrides:
internalStartProcess in class AbstractExternalProcess
java.io.IOException

handleOutput

protected void handleOutput(java.io.BufferedWriter out)
Overrides:
handleOutput in class AbstractExternalProcess


Copyright © April 2004 INRIA All Rights Reserved.