|
PTP Release 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.eclipse.core.internal.jobs.InternalJob
org.eclipse.core.runtime.jobs.Job
org.eclipse.ptp.remote.core.server.AbstractRemoteServerRunner
public abstract class AbstractRemoteServerRunner
| Nested Class Summary | |
|---|---|
static class |
AbstractRemoteServerRunner.ServerState
|
| Field Summary |
|---|
| Fields inherited from class org.eclipse.core.runtime.jobs.Job |
|---|
ASYNC_FINISH, BUILD, DECORATE, INTERACTIVE, LONG, NONE, RUNNING, SHORT, SLEEPING, WAITING |
| Fields inherited from class org.eclipse.core.internal.jobs.InternalJob |
|---|
manager |
| Constructor Summary | |
|---|---|
AbstractRemoteServerRunner(String name)
|
|
| Method Summary | |
|---|---|
protected abstract void |
doServerFinished(org.eclipse.core.runtime.IProgressMonitor monitor)
Called on termination of the server process |
protected abstract boolean |
doServerStarted(org.eclipse.core.runtime.IProgressMonitor monitor)
Called once the server starts |
protected abstract boolean |
doServerStarting(org.eclipse.core.runtime.IProgressMonitor monitor)
Called just prior to the server starting |
protected boolean |
doVerifyServerRunningFromStderr(String output)
Called with each line of stderr from the server. |
protected boolean |
doVerifyServerRunningFromStdout(String output)
Called with each line of stdout from the server. |
Map<String,String> |
getEnv()
|
InputStream |
getErrorStream()
Get the error stream of the remote process. |
InputStream |
getInputStream()
Get the input stream of the remote process. |
String |
getLaunchCommand()
Get the launch command for this server |
OutputStream |
getOutputStream()
Get the output stream of the remote process. |
String |
getPayload()
Get the payload. |
IRemoteConnection |
getRemoteConnection()
Get the remote connection used to launch the server |
AbstractRemoteServerRunner.ServerState |
getServerState()
Get the current state of the server. |
String |
getUnpackCommand()
Get the unpack command for this server |
String |
getVariable(String name)
Get the value of a variable that will be expanded in the launch command |
String |
getVerifyLaunchCommand()
|
String |
getVerifyLaunchFailMessage()
|
String |
getVerifyLaunchPattern()
|
String |
getVerifyUnpackCommand()
|
String |
getVerifyUnpackFailMessage()
|
String |
getVerifyUnpackPattern()
|
String |
getWorkingDir()
Get the working directory. |
protected org.eclipse.core.runtime.IStatus |
run(org.eclipse.core.runtime.IProgressMonitor monitor)
|
void |
setBundleId(String id)
Set the id of the bundle containing the remote server file. |
void |
setContinuous(boolean continuous)
Set flag to indicate job is continuous or only runs once. |
void |
setEnv(String env)
Set the environment prior to launching the server. |
void |
setLaunchCommand(String command)
Set the command used to launch the server |
void |
setPayload(String file)
Set the name of the payload |
void |
setRemoteConnection(IRemoteConnection conn)
Set the connection used to launch the server |
protected void |
setServerState(AbstractRemoteServerRunner.ServerState state)
Change the state of the server |
void |
setUnpackCommand(String command)
Set the command used to unpack the payload |
void |
setVariable(String name,
String value)
Set the value of a variable that will be expended in the launch command |
void |
setVerifyLaunchCommand(String verifyCommand)
|
void |
setVerifyLaunchFailMessage(String verifyFailMessage)
|
void |
setVerifyLaunchPattern(String verifyPattern)
|
void |
setVerifyUnpackCommand(String verifyCommand)
|
void |
setVerifyUnpackFailMessage(String verifyFailMessage)
|
void |
setVerifyUnpackPattern(String verifyPattern)
|
void |
setWorkDir(String workDir)
Set the working directory. |
void |
startServer(org.eclipse.core.runtime.IProgressMonitor monitor)
Start the server launch. |
protected void |
terminateServer()
Terminate the server |
void |
waitForServerFinish(org.eclipse.core.runtime.IProgressMonitor monitor)
Wait for the server to finished. |
void |
waitForServerStart(int timeout)
Wait for the server to start up for at most "timeout" ms. |
void |
waitForServerStart(org.eclipse.core.runtime.IProgressMonitor monitor)
Wait for the server to start up. |
| Methods inherited from class org.eclipse.core.runtime.jobs.Job |
|---|
addJobChangeListener, belongsTo, cancel, canceling, done, getJobManager, getName, getPriority, getProperty, getResult, getRule, getState, getThread, isBlocking, isSystem, isUser, join, removeJobChangeListener, schedule, schedule, setName, setPriority, setProgressGroup, setProperty, setRule, setSystem, setThread, setUser, shouldRun, shouldSchedule, sleep, toString, wakeUp, wakeUp, yieldRule |
| Methods inherited from class org.eclipse.core.internal.jobs.InternalJob |
|---|
compareTo |
| Methods inherited from class org.eclipse.core.runtime.PlatformObject |
|---|
getAdapter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Constructor Detail |
|---|
public AbstractRemoteServerRunner(String name)
| Method Detail |
|---|
public Map<String,String> getEnv()
public InputStream getErrorStream()
public InputStream getInputStream()
public String getLaunchCommand()
public OutputStream getOutputStream()
public String getPayload()
public IRemoteConnection getRemoteConnection()
public AbstractRemoteServerRunner.ServerState getServerState()
public String getUnpackCommand()
public String getVariable(String name)
name - variable namepublic String getVerifyLaunchCommand()
public String getVerifyLaunchFailMessage()
public String getVerifyLaunchPattern()
public String getVerifyUnpackCommand()
public String getVerifyUnpackFailMessage()
public String getVerifyUnpackPattern()
public String getWorkingDir()
public void setBundleId(String id)
id - bundle idpublic void setContinuous(boolean continuous)
continuous - true if the job runs continuouslypublic void setEnv(String env)
env - string containing environment (as returned by "env" command)public void setLaunchCommand(String command)
command - launch commandpublic void setPayload(String file)
file - payload namepublic void setRemoteConnection(IRemoteConnection conn)
conn - remote connectionpublic void setUnpackCommand(String command)
command - unpack command
public void setVariable(String name,
String value)
name - variable namevalue - variable valuepublic void setVerifyLaunchCommand(String verifyCommand)
verifyCommand - the new verify commandpublic void setVerifyLaunchFailMessage(String verifyFailMessage)
verifyFailMessage - the new verify fail messagepublic void setVerifyLaunchPattern(String verifyPattern)
verifyPattern - the new verify patternpublic void setVerifyUnpackCommand(String verifyCommand)
verifyCommand - the new verify commandpublic void setVerifyUnpackFailMessage(String verifyFailMessage)
verifyFailMessage - the new verify fail messagepublic void setVerifyUnpackPattern(String verifyPattern)
verifyPattern - the new verify patternpublic void setWorkDir(String workDir)
workDir - working directory
public void startServer(org.eclipse.core.runtime.IProgressMonitor monitor)
throws IOException
getServerState() or use waitForServerStart(int) to determine
when the server has actually started.
monitor - progress monitor that can be used to cancel the launch
IOException - if the launch failspublic void waitForServerFinish(org.eclipse.core.runtime.IProgressMonitor monitor)
monitor - progress monitor to cancel waitingpublic void waitForServerStart(int timeout)
timeout - time (in ms) to wait for server startup. A timeout of 0 means
wait forever.public void waitForServerStart(org.eclipse.core.runtime.IProgressMonitor monitor)
monitor - progress monitor to cancel waitingprotected abstract void doServerFinished(org.eclipse.core.runtime.IProgressMonitor monitor)
protected abstract boolean doServerStarted(org.eclipse.core.runtime.IProgressMonitor monitor)
protected abstract boolean doServerStarting(org.eclipse.core.runtime.IProgressMonitor monitor)
protected boolean doVerifyServerRunningFromStderr(String output)
output - line of stderr output from server
protected boolean doVerifyServerRunningFromStdout(String output)
output - line of stdout output from server
protected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
run in class org.eclipse.core.runtime.jobs.Jobprotected void setServerState(AbstractRemoteServerRunner.ServerState state)
state - new server stateprotected void terminateServer()
|
PTP Release 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||