|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class implementing this interface is able to start a process based on a command to execute. The command is built from arbitrary parameters (up to the implementation) and from the environment. The external process can be customized up to the moment it is started. Once started the call to methods to set the command throw an exception.
Field Summary | |
static org.apache.log4j.Logger |
logger
|
Method Summary | |
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. |
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 privatekey)
|
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. |
Field Detail |
public static final org.apache.log4j.Logger logger
Method Detail |
public java.lang.String[] getEnvironment()
public void setEnvironment(java.lang.String[] environment)
public java.lang.String getHostname()
public void setHostname(java.lang.String hostname)
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
public java.lang.String getCommand()
public void startProcess() throws java.io.IOException
java.io.IOException
- if the process cannot be started.public void stopProcess()
public int waitFor() throws java.lang.InterruptedException
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()
public boolean isFinished()
public void setCertificateLocation(java.lang.String file)
public java.lang.String getCertificateLocation()
public void setPrivateKeyLocation(java.lang.String privatekey)
public java.lang.String getPrivateKeyLocation()
public void setSecurityFile(java.lang.String privatekey)
public java.lang.String getSecurityFile()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |