|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.process.AbstractListProcessDecorator
This class contains a list of ExternalProcessDecorator processes that share the same configuration. It represents a wrapper on the list of processes.
Field Summary | |
protected ExternalProcessDecorator |
baseProcess
|
protected java.lang.String |
beginIndex
|
protected java.lang.String |
domain
|
protected java.lang.String |
endIndex
|
protected java.util.ArrayList |
excludeArray
|
protected java.lang.String |
fixedName
|
protected java.lang.String |
list
|
protected int |
nodeNumber
|
protected int |
padding
|
protected java.util.ArrayList |
processes
|
protected int |
step
|
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 | |
AbstractListProcessDecorator()
|
Method Summary | |
protected boolean |
checkNonEmpty(java.lang.String s)
|
void |
closeStream()
Closes Input, Output, Error stream just after forking this process |
protected abstract ExternalProcessDecorator |
createProcess()
|
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 composition that occurs between the commands of two processes. |
java.lang.String[] |
getEnvironment()
Returns the current environment for this process. |
MessageLogger |
getErrorMessageLogger()
Returns the MessageLogger handling the error stream of the process |
UniversalProcess |
getFinalProcess()
Returns the last process of the chain |
java.lang.String |
getHostname()
Return the hostname target of this process. |
MessageLogger |
getInputMessageLogger()
Returns the MessageLogger handling the input stream of the process |
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. |
protected java.lang.String |
handlePadding(java.lang.String word)
|
boolean |
isFinished()
Returns true if and only if this process has been stopped. |
boolean |
isStarted()
Returns true if and only if this process has been started. |
protected void |
setAllIndex(java.lang.String list)
|
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(MessageLogger errorMessageLogger)
sets the MessageLogger handling the error stream of the process |
void |
setHostConfig(java.lang.String fixedName,
java.lang.String list,
java.lang.String domain,
int padding)
|
void |
setHostList(java.lang.String hostlistattr,
java.lang.String domain)
|
void |
setHostname(java.lang.String hostname)
Set the hostname target of this process. |
void |
setInputMessageLogger(MessageLogger inputMessageLogger)
sets the MessageLogger handling the input stream of the process |
void |
setOutputMessageSink(MessageSink outputMessageSink)
sets the MessageSink handling the output stream of the 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 |
startProcess()
Starts the process by executing the command. |
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 |
Field Detail |
protected java.util.ArrayList processes
protected ExternalProcessDecorator baseProcess
protected java.lang.String fixedName
protected java.lang.String domain
protected java.lang.String list
protected java.lang.String beginIndex
protected java.lang.String endIndex
protected int padding
protected int step
protected java.util.ArrayList excludeArray
protected int nodeNumber
Constructor Detail |
public AbstractListProcessDecorator()
Method Detail |
public void setHostConfig(java.lang.String fixedName, java.lang.String list, java.lang.String domain, int padding)
public void setHostList(java.lang.String hostlistattr, java.lang.String domain)
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()
ExternalProcessDecorator
getCompositionType
in interface ExternalProcessDecorator
ExternalProcessDecorator.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 void closeStream()
ExternalProcess
closeStream
in interface ExternalProcess
ExternalProcess.closeStream()
public MessageLogger getInputMessageLogger()
ExternalProcess
getInputMessageLogger
in interface ExternalProcess
ExternalProcess.getInputMessageLogger()
public MessageLogger getErrorMessageLogger()
ExternalProcess
getErrorMessageLogger
in interface ExternalProcess
ExternalProcess.getErrorMessageLogger()
public MessageSink getOutputMessageSink()
ExternalProcess
getOutputMessageSink
in interface ExternalProcess
ExternalProcess.getOutputMessageSink()
public void setInputMessageLogger(MessageLogger inputMessageLogger)
ExternalProcess
setInputMessageLogger
in interface ExternalProcess
inputMessageLogger
- the handler of the input stream of the processExternalProcess.setInputMessageLogger(org.objectweb.proactive.core.util.MessageLogger)
public void setErrorMessageLogger(MessageLogger errorMessageLogger)
ExternalProcess
setErrorMessageLogger
in interface ExternalProcess
errorMessageLogger
- the handler of the error stream of the processExternalProcess.setErrorMessageLogger(org.objectweb.proactive.core.util.MessageLogger)
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 getHostname()
UniversalProcess
getHostname
in interface UniversalProcess
UniversalProcess.getHostname()
public void setHostname(java.lang.String hostname)
UniversalProcess
setHostname
in interface UniversalProcess
hostname
- the target hostname.UniversalProcess.setHostname(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 void startProcess() throws java.io.IOException
UniversalProcess
startProcess
in interface UniversalProcess
java.io.IOException
- if the process cannot be started.UniversalProcess.startProcess()
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 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 ExternalProcessDecorator createProcess()
protected void setAllIndex(java.lang.String list)
protected java.lang.String handlePadding(java.lang.String word)
protected boolean checkNonEmpty(java.lang.String s)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |