|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.proactive.core.process.AbstractUniversalProcess
Field Summary | |
protected java.lang.String |
certificateLocation
|
protected java.lang.String |
command
|
static java.lang.String |
DEFAULT_HOSTNAME
|
static java.lang.String |
DEFAULT_USERNAME
|
protected java.lang.String[] |
environment
|
protected java.lang.String |
hostname
|
protected boolean |
isFinished
|
protected boolean |
isStarted
|
protected static java.lang.String |
LOCALHOST
|
protected java.lang.String |
privateKeyLocation
|
protected java.lang.String |
securityFile
|
protected java.lang.String |
username
|
Fields inherited from interface org.objectweb.proactive.core.process.UniversalProcess |
logger |
Constructor Summary | |
protected |
AbstractUniversalProcess()
|
Method Summary | |
protected abstract java.lang.String |
buildCommand()
|
protected void |
checkStarted()
|
java.lang.String |
getCertificateLocation()
|
java.lang.String |
getCommand()
Returns the command that will be or has been execute by the process. |
java.lang.String[] |
getEnvironment()
Returns the current environment for this process. |
java.lang.String |
getHostname()
Return the hostname target of this process. |
java.lang.String |
getPrivateKeyLocation()
|
java.lang.String |
getSecurityFile()
|
java.lang.String |
getUsername()
Return the username that will be used to run the command. |
protected abstract void |
internalStartProcess(java.lang.String commandToExecute)
|
protected abstract void |
internalStopProcess()
|
protected abstract int |
internalWaitFor()
|
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. |
void |
setCertificateLocation(java.lang.String file)
|
void |
setEnvironment(java.lang.String[] environment)
Set the environment for this process. |
void |
setHostname(java.lang.String hostname)
Set the hostname target of this process. |
void |
setPrivateKeyLocation(java.lang.String privatekey)
|
void |
setSecurityFile(java.lang.String securityFile)
|
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. |
java.lang.String |
toString()
|
protected void |
toString(java.lang.StringBuffer sb)
|
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, wait, wait, wait |
Field Detail |
protected static final java.lang.String LOCALHOST
public static final java.lang.String DEFAULT_USERNAME
public static final java.lang.String DEFAULT_HOSTNAME
protected java.lang.String hostname
protected java.lang.String username
protected java.lang.String[] environment
protected java.lang.String command
protected boolean isStarted
protected boolean isFinished
protected java.lang.String certificateLocation
protected java.lang.String privateKeyLocation
protected java.lang.String securityFile
Constructor Detail |
protected AbstractUniversalProcess()
Method Detail |
public java.lang.String getCommand()
UniversalProcess
getCommand
in interface UniversalProcess
public void setEnvironment(java.lang.String[] environment)
UniversalProcess
setEnvironment
in interface UniversalProcess
public java.lang.String[] getEnvironment()
UniversalProcess
getEnvironment
in interface UniversalProcess
public java.lang.String getHostname()
UniversalProcess
getHostname
in interface UniversalProcess
public void setHostname(java.lang.String hostname)
UniversalProcess
setHostname
in interface UniversalProcess
public java.lang.String getUsername()
UniversalProcess
getUsername
in interface UniversalProcess
public void setUsername(java.lang.String username)
UniversalProcess
setUsername
in interface UniversalProcess
public void startProcess() throws java.io.IOException
UniversalProcess
startProcess
in interface UniversalProcess
java.io.IOException
- if the process cannot be started.public void stopProcess()
UniversalProcess
stopProcess
in interface UniversalProcess
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 thrownpublic boolean isStarted()
UniversalProcess
isStarted
in interface UniversalProcess
public boolean isFinished()
UniversalProcess
isFinished
in interface UniversalProcess
public java.lang.String toString()
toString
in class java.lang.Object
public void setCertificateLocation(java.lang.String file)
setCertificateLocation
in interface UniversalProcess
public java.lang.String getCertificateLocation()
getCertificateLocation
in interface UniversalProcess
public void setPrivateKeyLocation(java.lang.String privatekey)
setPrivateKeyLocation
in interface UniversalProcess
public java.lang.String getPrivateKeyLocation()
getPrivateKeyLocation
in interface UniversalProcess
public void setSecurityFile(java.lang.String securityFile)
setSecurityFile
in interface UniversalProcess
public java.lang.String getSecurityFile()
getSecurityFile
in interface UniversalProcess
protected void toString(java.lang.StringBuffer sb)
protected void checkStarted()
protected abstract java.lang.String buildCommand()
protected abstract void internalStartProcess(java.lang.String commandToExecute) throws java.io.IOException
java.io.IOException
protected abstract void internalStopProcess()
protected abstract int internalWaitFor() throws java.lang.InterruptedException
java.lang.InterruptedException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |