|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.ide.runner.Starter
A class that represents a way of starting a process.
Field Summary | |
protected java.lang.Process |
process
The Process that has been started. |
protected RunProcess |
runProcess
The RunProcess that will be or has been started by this Starter. |
protected java.lang.Exception |
startException
Exception thrown from Runtime exec. |
Constructor Summary | |
protected |
Starter(RunProcess runProcess)
The constructor simply sets the runProcess field. |
Method Summary | |
boolean |
canStart(java.util.List errors)
Returns true if the process can be started. |
boolean |
canTerminate()
Tests whether this Starter can terminate the process. |
boolean |
canTerminateGracefully()
Tests whether this Starter can terminate the process gracefully. |
void |
finished()
This method is called when the process has finished. |
java.lang.Integer |
getExitCode()
Returns the exit code for the process. |
java.lang.Process |
getProcess()
Returns the process that was started. |
java.lang.String[] |
getStartCommand()
Returns the command line that will be executed to start the process. |
java.io.File |
getStartDirectory()
Returns the working directory that will be used to start the process. |
java.lang.String[] |
getStartEnvironmentParams()
Returns the environment parameters that will be used in starting the process. |
java.lang.Exception |
getStartException()
|
boolean |
mustPrepareToStart()
If the starter needs to do some work before starting and that work should not be done on the event thread, then the starter should override this method. |
boolean |
prepareToStart()
If the starter needs to do some work before starting and that work should not be done on the event thread, then the starter should override this method. |
java.lang.Boolean |
reuseLogPage(RunLogPage runLogPage)
This method gives the starter a chance to control the behavior of reusing a RunLogPage . |
boolean |
start()
Starts the process. |
void |
terminate()
Terminates the process. |
void |
terminateGracefully()
Terminates the process gracefully. |
int |
waitForProcess()
Waits for the process to finish and returns the exit code for the process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected RunProcess runProcess
protected java.lang.Process process
protected java.lang.Exception startException
Constructor Detail |
protected Starter(RunProcess runProcess)
runProcess
field.
Method Detail |
public java.lang.String[] getStartEnvironmentParams()
The default behavior is to call the
RunProcess.getStartEnvironmentParams()
method.
public java.io.File getStartDirectory()
The default behavior is to call the
RunProcess.getStartDirectory()
method.
public java.lang.String[] getStartCommand()
The default behavior is to call the
RunProcess.getStartCommand()
method.
public java.lang.Boolean reuseLogPage(RunLogPage runLogPage)
RunLogPage
. This method is called when a
RunProcess
needs a run log page. It is called with
each existing run log page, until a reusable page is found. If no
existing run log page is reusable, then a new run log page will be
created.
The implementation here, returning null
, will let the
RunProcess
decide whether it should reuse the page or not.
Some subclasses of Starter
may decide to override
this method. They should return
Boolean.TRUE
to reuse the log page.
Boolean.FALSE
not to reuse the log page.
null
to let the RunProcess
decide.
runLogPage
- the run log page being considered for reuse
public boolean canStart(java.util.List errors)
errors
- a list of error messages
public boolean mustPrepareToStart()
public boolean prepareToStart()
public boolean start()
After the process is started, it calls the
RunProcess.redirectOutput(java.io.InputStream, java.io.InputStream)
method with
the standard output and error streams and the
RunProcess.redirectInput(java.io.OutputStream)
method with the
standard input stream.
true
if the process was started.public int waitForProcess()
public java.lang.Integer getExitCode()
public java.lang.Process getProcess()
public java.lang.Exception getStartException()
public boolean canTerminateGracefully()
true
if this Starter can terminate the
process gracefully.public void terminateGracefully()
public boolean canTerminate()
true
if this Starter can terminate the
process.public void terminate()
public void finished()
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.