@UESComponent public interface UESProcessManager extends UESProcessManager
UESProcessManager
UESProcessManager
Modifier and Type | Method and Description |
---|---|
void |
forkSystemProcess()
Creates the new child-process for current process and makes it active (all
following commands are executed in this child-process).
|
<T> java.util.List<T> |
getParameterChain(java.lang.String aName,
Returns hierarchy of parameters from process environment.
|
PCB |
getPCB()
Returns PCB of active process.
|
PID |
getPID()
Only one process have to be active on thread.
|
PID |
getRootPID()
Returns PID of the root process.
|
PID |
getSystemPID()
Returns PID of nearest system process in branch of active PID.
|
boolean |
isInheritedParameter(java.lang.String aName)
Checks if process environment parameter under given name is owned by active process or
is inherited from parent process.
|
void |
killProcessSubtree(PID aPID)
Changes active PID to given one and disposes whole subtree of given PID.
|
void |
restoreProcess(java.io.InputStream aIn)
Method restores PCB from given input stream and merges this PCB into active one.
|
void |
startNewSystemProcess()
Method switches active process to root process and creates new child-process
which is made active (all following commands are executed in this child-process).
|
void |
storeProcess(java.io.OutputStream aOut)
Method stores (serializes) active PCB into given output stream.
|
exitProcess, forkProcess, getParameter, setParameter, setRetainedParameter
This method can be used only if current process is system process (has no session process ID associated). It is not possible to fork system process from application process. Application process tree must be first exited before calling this method.
UESProcessManagerRTException
- In case fork of process failed or fork is not possibleThis method should be used with extreme caution only in situations when some new thread was started from already forked and initialized thread, but we need to use the new thread as root process (e.g. when starting local job executor thread from application and not as standalone executor server). Calling this method from other place than newly started thread can cause memory leaks and unexpected application behavior.
UESProcessManagerRTException
- In case starting of new system process failed or is not possibleaPID
- PID of process to be used as new active oneUESProcessManagerRTException
- In case kill of process tree failed or kill is not possibleaOut
- Output stream used for PCB serializationUESProcessManagerRTException
- In case serialization of process failed or serialization
is not possible due to unfulfilled preconditions.aIn
- Input stream with serialized PCBUESProcessManagerRTException
- In case restore of process failed or restoring is not
possible due to unfulfilled preconditions.aName
- Name of parameterT
- Type of parameter valueaName
- Name of parameteraParamClass
- Class of parameter valueUESProcessManagerRTException
- In case reading of parameter chain fails or read is not
possible(e.g. given class does not match type of parameter stored under given name)