IProcessthat wrappers a system 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
DebugPlugin.newProcess(...), which can delegate to an
IProcessFactory if one is referenced by the associated launch configuration.
Method SummaryModifier and TypeMethodDescription
booleanReturns whether this element can be terminated.
protected IStreamsProxyCreates and returns the streams proxy associated with this process.
protected voidFires a change event.
protected voidFires a creation event.
protected voidFires the given debug event.
protected voidFires a terminate event.
<T> TReturns an object which is an instance of the given class associated with this object.Returns the value of a client defined attribute.
intReturns the exit value of this process.
getLabel()Returns a human-readable label for this process.Returns the launch this element originated from.Returns a proxy to the standard input, output, and error streams for this process, or
nullif not supported.
protected ProcessReturns the underlying system process associated with this process.
booleanReturns whether this element is terminated.
voidSets the value of a client defined attribute.
protected voidSets the launch this process is contained in
voidCauses this element to terminate, generating a
protected voidNotification that the system process associated with this process has terminated.
RuntimeProcessConstructs a RuntimeProcess on the given system process with the given name, adding this process to the given launch.
launch- the parent launch of this process
process- underlying system process
name- the label used for this process
attributes- map of attributes used to initialize the attributes of this process, or
canTerminatepublic boolean canTerminate()Returns whether this element can be terminated.
getLabelpublic String getLabel()Returns a human-readable label for this process.
setLaunchprotected void setLaunch
(ILaunch launch)Sets the launch this process is contained in
launch- the launch this process is contained in
getLaunchpublic ILaunch getLaunch()Returns the launch this element originated from.
getSystemProcessprotected Process getSystemProcess()Returns the underlying system process associated with this process.
- system process
isTerminatedpublic boolean isTerminated()Returns whether this element is terminated.
terminatepublic void terminate() throws DebugExceptionCauses this element to terminate, generating a
TERMINATEevent. Implementations may be blocking or non-blocking.
terminatedprotected void terminated()Notification that the system process associated with this process has terminated.
getStreamsProxypublic IStreamsProxy getStreamsProxy()Returns a proxy to the standard input, output, and error streams for this process, or
nullif not supported.
createStreamsProxyprotected IStreamsProxy createStreamsProxy()Creates and returns the streams proxy associated with this process.
- streams proxy
fireCreationEventprotected void fireCreationEvent()Fires a creation event.
fireEventprotected void fireEvent
(DebugEvent event)Fires the given debug event.
event- debug event to fire
fireTerminateEventprotected void fireTerminateEvent()Fires a terminate event.
fireChangeEventprotected void fireChangeEvent()Fires a change event.
setAttributeSets the value of a client defined attribute.
getAttributeReturns the value of a client defined attribute.
getAdapterpublic <T> T getAdapter
(Class<T> adapter)Description copied from class:
PlatformObjectReturns an object which is an instance of the given class associated with this object. Returns
nullif no such object can be found.
This implementation of the method declared by
IAdaptablepasses the request along to the platform's adapter manager; roughly
Platform.getAdapterManager().getAdapter(this, adapter). Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted).
getExitValuepublic int getExitValue() throws DebugExceptionReturns the exit value of this process. Conventionally, 0 indicates normal termination.