|
Eclipse Platform Release 3.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.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 associatd 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()
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 launch this process will be parented byprocess
- underlyig system processname
- the label used for this processattributes
- map of attributes used to initialize the attributes
of this process, or null
if noneMethod Detail |
public boolean canTerminate()
ITerminate
canTerminate
in interface ITerminate
ITerminate.canTerminate()
public String getLabel()
IProcess
getLabel
in interface IProcess
IProcess.getLabel()
protected void setLaunch(ILaunch launch)
launch
- the launch this process is contained inpublic ILaunch getLaunch()
IProcess
getLaunch
in interface IProcess
IProcess.getLaunch()
protected Process getSystemProcess()
public boolean isTerminated()
ITerminate
isTerminated
in interface ITerminate
ITerminate.isTerminated()
public void terminate() throws DebugException
ITerminate
TERMINATE
event.
Implementations may be blocking or non-blocking.
terminate
in interface ITerminate
DebugException
- on failure. Reasons include:ITerminate.terminate()
protected void terminated()
public IStreamsProxy getStreamsProxy()
IProcess
null
if not supported.
getStreamsProxy
in interface IProcess
null
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 IProcess
key
- the attribute keyvalue
- the attribute valueIProcess.setAttribute(String, String)
public String getAttribute(String key)
IProcess
getAttribute
in interface IProcess
key
- the attribute key
null
if undefinedIProcess.getAttribute(String)
public Object getAdapter(Class adapter)
IAdaptable
null
if
no such object can be found.
getAdapter
in interface IAdaptable
getAdapter
in class PlatformObject
adapter
- the class to adapt to
null
IAdaptable.getAdapter(Class)
,
Platform.getAdapterManager()
public int getExitValue() throws DebugException
IProcess
getExitValue
in interface IProcess
DebugException
- if this process has not yet terminatedIProcess.getExitValue()
|
Eclipse Platform Release 3.0 |
||||||||||
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, 2004. All rights reserved.