|
Eclipse Platform Release 3.3 |
|||||||||||
| 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.debug.core.model.RuntimeProcess
Standard implementation of an IProcess that wrappers a system
process (java.lang.Process).
Clients may subclass this class. Clients that need to replace the implementation
of a streams proxy associated with an IProcess should subclass this
class. Generally clients should not instantiate this class directly, but should
instead call DebugPlugin.newProcess(...), which can delegate to an
IProcessFactory if one is referenced by the associated launch configuration.
IProcess,
IProcessFactory| Field Summary |
|---|
| Fields inherited from interface org.eclipse.debug.core.model.IProcess |
|---|
ATTR_CMDLINE, ATTR_PROCESS_LABEL, ATTR_PROCESS_TYPE |
| Constructor Summary | |
|---|---|
RuntimeProcess(ILaunch launch,
Process process,
String name,
Map attributes)
Constructs a RuntimeProcess on the given system process with the given name, adding this process to the given launch. |
|
| Method Summary | |
|---|---|
boolean |
canTerminate()
Returns whether this element can be terminated. |
protected IStreamsProxy |
createStreamsProxy()
Creates and returns the streams proxy associated with this process. |
protected void |
fireChangeEvent()
Fires a change event. |
protected void |
fireCreationEvent()
Fires a creation event. |
protected void |
fireEvent(DebugEvent event)
Fires the given debug event. |
protected void |
fireTerminateEvent()
Fires a terminate event. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
String |
getAttribute(String key)
Returns the value of a client defined attribute. |
int |
getExitValue()
Returns the exit value of this process. |
String |
getLabel()
Returns a human-readable label for this process. |
ILaunch |
getLaunch()
Returns the launch this element originated from. |
IStreamsProxy |
getStreamsProxy()
Returns a proxy to the standard input, output, and error streams for this process, or null if not supported. |
protected Process |
getSystemProcess()
Returns the underlying system process associated with this process. |
boolean |
isTerminated()
Returns whether this element is terminated. |
void |
setAttribute(String key,
String value)
Sets the value of a client defined attribute. |
protected void |
setLaunch(ILaunch launch)
Sets the launch this process is contained in |
void |
terminate()
Causes this element to terminate, generating a TERMINATE event.
|
protected void |
terminated()
Notification that the system process associated with this process has terminated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public RuntimeProcess(ILaunch launch,
Process process,
String name,
Map attributes)
launch - the parent launch of this processprocess - underlying system processname - the label used for this processattributes - map of attributes used to initialize the attributes
of this process, or null if none| Method Detail |
public boolean canTerminate()
ITerminate
canTerminate in interface ITerminateITerminate.canTerminate()public String getLabel()
IProcess
getLabel in interface IProcessIProcess.getLabel()protected void setLaunch(ILaunch launch)
launch - the launch this process is contained inpublic ILaunch getLaunch()
IProcess
getLaunch in interface IProcessIProcess.getLaunch()protected Process getSystemProcess()
public boolean isTerminated()
ITerminate
isTerminated in interface ITerminateITerminate.isTerminated()
public void terminate()
throws DebugException
ITerminateTERMINATE event.
Implementations may be blocking or non-blocking.
terminate in interface ITerminateDebugException - on failure. Reasons include:ITerminate.terminate()protected void terminated()
public IStreamsProxy getStreamsProxy()
IProcessnull if not supported.
getStreamsProxy in interface IProcessnull if not supportedIProcess.getStreamsProxy()protected IStreamsProxy createStreamsProxy()
protected void fireCreationEvent()
protected void fireEvent(DebugEvent event)
event - debug event to fireprotected void fireTerminateEvent()
protected void fireChangeEvent()
public void setAttribute(String key,
String value)
IProcess
setAttribute in interface IProcesskey - the attribute keyvalue - the attribute valueIProcess.setAttribute(String, String)public String getAttribute(String key)
IProcess
getAttribute in interface IProcesskey - the attribute key
null if undefinedIProcess.getAttribute(String)public Object getAdapter(Class adapter)
IAdaptablenull if
no such object can be found.
getAdapter in interface IAdaptablegetAdapter in class PlatformObjectadapter - the class to adapt to
nullIAdaptable.getAdapter(Class),
Platform.getAdapterManager()
public int getExitValue()
throws DebugException
IProcess
getExitValue in interface IProcessDebugException - if this process has not yet terminatedIProcess.getExitValue()
|
Eclipse Platform Release 3.3 |
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.