|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.process.AbstractSequentialListProcessDecorator
This class contains a list of ExternalProcess processes that have to be executed sequentially
Field Summary | |
protected int |
currentRank
|
protected java.util.ArrayList |
processes
|
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 | |
AbstractSequentialListProcessDecorator()
|
Method Summary | |
void |
addProcessToList(ExternalProcess process)
Add a process to the processes queue |
void |
addProcessToList(int rank,
ExternalProcess process)
Add a process to the processes queue at index rank |
void |
closeStream()
Closes Input, Output, Error stream just after forking this process |
protected abstract ExternalProcess |
createProcess()
|
int |
exitValue()
This method returns the exit value of the subprocess. |
java.lang.String |
getCommand()
Returns the command that will be or has been execute by the process. |
java.lang.String |
getCommandPath()
Returns the path of the command to be executed by this process |
int |
getCompositionType()
Returns the type of this process. |
java.lang.String[] |
getEnvironment()
Returns the current environment for this process. |
RemoteProcessMessageLogger |
getErrorMessageLogger()
Returns the RemoteProcessMessageLogger handling the error stream of the process |
FileTransferWorkShop |
getFileTransferWorkShopDeploy()
This method returns a single FileTransferStructure instance for this process. |
FileTransferWorkShop |
getFileTransferWorkShopRetrieve()
This method returns a single FileTransferStructure instance for this process. |
UniversalProcess |
getFinalProcess()
Returns the last process of the chain |
ExternalProcess |
getFirstProcess()
Return the next process to be launched and increase current rank |
RemoteProcessMessageLogger |
getInputMessageLogger()
Returns the RemoteProcessMessageLogger handling the input stream of the process |
java.util.ArrayList |
getListProcess()
|
ExternalProcess |
getNextProcess()
Return the next process to be launched and increase current rank |
int |
getNodeNumber()
Returns the number of nodes targeted |
MessageSink |
getOutputMessageSink()
Returns the MessageSink handling the output stream of the process |
java.lang.String |
getProcessId()
Returns the id of the process |
ExternalProcess |
getTargetProcess()
Returns the process target of this process. |
java.lang.String |
getUsername()
Return the username that will be used to run the command. |
boolean |
isFinished()
Returns true if and only if this process has been stopped. |
boolean |
isSequential()
Returns true if and only if this process is sequential |
boolean |
isStarted()
Returns true if and only if this process has been started. |
void |
setCommandPath(java.lang.String path)
Sets the path of the command to be executed by this process |
void |
setCompositionType(int compositionType)
Sets the type of composition that occurs between the commands of two processes. |
void |
setEnvironment(java.lang.String[] environment)
Set the environment for this process. |
void |
setErrorMessageLogger(RemoteProcessMessageLogger errorMessageLogger)
sets the RemoteProcessMessageLogger handling the error stream of the process |
void |
setInputMessageLogger(RemoteProcessMessageLogger inputMessageLogger)
sets the RemoteProcessMessageLogger handling the input stream of the process |
void |
setOutputMessageSink(MessageSink outputMessageSink)
sets the MessageSink handling the output stream of the process |
void |
setStarted(boolean isStarted)
Sets the state started of this process |
void |
setTargetProcess(ExternalProcess targetProcess)
Sets the process target of this process. |
void |
setUsername(java.lang.String username)
Set the username that will be used to run the command. |
void |
startFileTransfer()
Starts the FileTransfer if defined for this process. |
void |
stopProcess()
Stops the running process. |
int |
waitFor()
Causes the current thread to wait until this Process has terminated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
getHostname, isDependent, isHierarchical, setHostname, startProcess |
Field Detail |
protected java.util.ArrayList processes
protected int currentRank
Constructor Detail |
public AbstractSequentialListProcessDecorator()
Method Detail |
public void addProcessToList(ExternalProcess process)
process
- public void addProcessToList(int rank, ExternalProcess process)
rank
- process
- public ExternalProcess getFirstProcess()
public ExternalProcess getNextProcess()
public ExternalProcess getTargetProcess()
ExternalProcessDecorator
getTargetProcess
in interface ExternalProcessDecorator
ExternalProcessDecorator.getTargetProcess()
public void setTargetProcess(ExternalProcess targetProcess)
ExternalProcessDecorator
setTargetProcess
in interface ExternalProcessDecorator
targetProcess
- the process target of this processExternalProcessDecorator.setTargetProcess(org.objectweb.proactive.core.process.ExternalProcess)
public int getCompositionType()
ExternalProcess
getCompositionType
in interface ExternalProcess
ExternalProcess.getCompositionType()
public void setCompositionType(int compositionType)
ExternalProcessDecorator
setCompositionType
in interface ExternalProcessDecorator
compositionType
- the type of composition that occurs between the commands of two processesExternalProcessDecorator.setCompositionType(int)
public FileTransferWorkShop getFileTransferWorkShopRetrieve()
ExternalProcess
getFileTransferWorkShopRetrieve
in interface ExternalProcess
public FileTransferWorkShop getFileTransferWorkShopDeploy()
ExternalProcess
getFileTransferWorkShopDeploy
in interface ExternalProcess
public void startFileTransfer()
UniversalProcess
startFileTransfer
in interface UniversalProcess
public void closeStream()
ExternalProcess
closeStream
in interface ExternalProcess
ExternalProcess.closeStream()
public RemoteProcessMessageLogger getInputMessageLogger()
ExternalProcess
getInputMessageLogger
in interface ExternalProcess
ExternalProcess.getInputMessageLogger()
public RemoteProcessMessageLogger getErrorMessageLogger()
ExternalProcess
getErrorMessageLogger
in interface ExternalProcess
ExternalProcess.getErrorMessageLogger()
public MessageSink getOutputMessageSink()
ExternalProcess
getOutputMessageSink
in interface ExternalProcess
ExternalProcess.getOutputMessageSink()
public void setInputMessageLogger(RemoteProcessMessageLogger inputMessageLogger)
ExternalProcess
setInputMessageLogger
in interface ExternalProcess
inputMessageLogger
- the handler of the input stream of the processExternalProcess.setInputMessageLogger(org.objectweb.proactive.core.util.RemoteProcessMessageLogger)
public void setErrorMessageLogger(RemoteProcessMessageLogger errorMessageLogger)
ExternalProcess
setErrorMessageLogger
in interface ExternalProcess
errorMessageLogger
- the handler of the error stream of the processExternalProcess.setErrorMessageLogger(org.objectweb.proactive.core.util.RemoteProcessMessageLogger)
public void setOutputMessageSink(MessageSink outputMessageSink)
ExternalProcess
setOutputMessageSink
in interface ExternalProcess
outputMessageSink
- the handler of the output stream of the processExternalProcess.setOutputMessageSink(org.objectweb.proactive.core.process.MessageSink)
public java.lang.String[] getEnvironment()
UniversalProcess
getEnvironment
in interface UniversalProcess
UniversalProcess.getEnvironment()
public void setEnvironment(java.lang.String[] environment)
UniversalProcess
setEnvironment
in interface UniversalProcess
environment
- an array of string containing all environment variables or
null if the environment is emptyUniversalProcess.setEnvironment(java.lang.String[])
public java.lang.String getUsername()
UniversalProcess
getUsername
in interface UniversalProcess
UniversalProcess.getUsername()
public void setUsername(java.lang.String username)
UniversalProcess
setUsername
in interface UniversalProcess
username
- the target username or null to use the default one.UniversalProcess.setUsername(java.lang.String)
public java.lang.String getCommand()
UniversalProcess
getCommand
in interface UniversalProcess
UniversalProcess.getCommand()
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 java.util.ArrayList getListProcess()
public void stopProcess()
UniversalProcess
stopProcess
in interface UniversalProcess
UniversalProcess.stopProcess()
public int waitFor() throws java.lang.InterruptedException
UniversalProcess
waitFor
in interface UniversalProcess
java.lang.InterruptedException
- if the current thread is interrupted by another thread while it is waiting.
Then the wait is ended and an InterruptedException is thrownUniversalProcess.waitFor()
public boolean isStarted()
UniversalProcess
isStarted
in interface UniversalProcess
UniversalProcess.isStarted()
public boolean isFinished()
UniversalProcess
isFinished
in interface UniversalProcess
UniversalProcess.isFinished()
public boolean isSequential()
UniversalProcess
isSequential
in interface UniversalProcess
public void setCommandPath(java.lang.String path)
UniversalProcess
setCommandPath
in interface UniversalProcess
UniversalProcess.setCommandPath(java.lang.String)
public java.lang.String getCommandPath()
UniversalProcess
getCommandPath
in interface UniversalProcess
UniversalProcess.getCommandPath()
protected abstract ExternalProcess createProcess()
public int exitValue() throws java.lang.IllegalThreadStateException
UniversalProcess
exitValue
in interface UniversalProcess
java.lang.IllegalThreadStateException
- if the current thread is not yet terminated while it is trying to get a return value.public void setStarted(boolean isStarted)
UniversalProcess
setStarted
in interface UniversalProcess
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |