|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectthings.thinger.kernel.ProcessCoordinator
public class ProcessCoordinator
A process coordinator. This is mostly a helper for the Kernel.
Version History
EPG - Initial - 13FEB06 EPG - Change to use Clearance - 1 Dec 06
Field Summary | |
---|---|
static java.lang.String |
PROCESS_TABLE_ENTRY1_TAG
|
static java.lang.String |
PROCESS_TABLE_ENTRY2_ID
|
static java.lang.String |
PROCESS_TABLE_ENTRY3_CLEARANCE
|
static java.lang.String |
PROCESS_TABLE_ENTRY4_RUNTIME
|
static java.lang.String |
PROCESS_TABLE_ENTRY5_NAME
|
static java.lang.String |
PROCESS_TABLE_ENTRY6_STATE
|
static java.lang.String |
PROCESS_TABLE_ENTRY7_STATE_NUMERIC
|
Constructor Summary | |
---|---|
ProcessCoordinator(WhoAmI id)
Constructor. |
Method Summary | |
---|---|
WhoAmI |
callerId()
Get the calling processes ID. |
boolean |
checkClearance(Clearance requiredLevel)
Check the clearance. |
void |
dumpProcessTable(Table<java.lang.String> target)
Get a process table. |
PCB |
getProcess(java.lang.String id)
Get a process by String ID. |
PCB |
getProcess(WhoAmI id)
Get a process by WhoAmID. |
java.util.Collection<PCB> |
getProcesses()
Get the processes registered with the coordinator. |
PCB |
getProcessOrganic(java.lang.String organicId)
Get a process by its organic ID. |
void |
registerProcess(PCB aPCB,
Clearance processClearance)
Register a process as a ready PCB. |
PCB |
registerProcess(ThingsProcess aProcess,
Clearance processClearance,
ThingsPropertyView localProperties,
ThingsPropertyViewReader configProperties)
Register process. |
void |
removeProcess(java.lang.String id)
Remove a processes by String ID. |
void |
removeProcess(WhoAmI id)
Remove a processes by String ID. |
WhoAmI |
requireClearance(Clearance requiredLevel,
java.lang.String operationName)
Require Clearance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String PROCESS_TABLE_ENTRY1_TAG
public static final java.lang.String PROCESS_TABLE_ENTRY2_ID
public static final java.lang.String PROCESS_TABLE_ENTRY3_CLEARANCE
public static final java.lang.String PROCESS_TABLE_ENTRY4_RUNTIME
public static final java.lang.String PROCESS_TABLE_ENTRY5_NAME
public static final java.lang.String PROCESS_TABLE_ENTRY6_STATE
public static final java.lang.String PROCESS_TABLE_ENTRY7_STATE_NUMERIC
Constructor Detail |
---|
public ProcessCoordinator(WhoAmI id) throws SystemException
id
- The ID of the ResourceCoordinator.
SystemException
WhoAmI
Method Detail |
---|
public PCB registerProcess(ThingsProcess aProcess, Clearance processClearance, ThingsPropertyView localProperties, ThingsPropertyViewReader configProperties) throws SystemException
aProcess
- The process to register.processClearance
- The clearance level. This will be immutable.localProperties
- properties visible to this process.configProperties
- configuration properties visible to this process.
SystemException
ThingsPropertyView
,
ThingsPropertyViewReader
public void registerProcess(PCB aPCB, Clearance processClearance) throws SystemException
aPCB
- The process to register.processClearance
- The clearance level. This will be immutable.
SystemException
public java.util.Collection<PCB> getProcesses() throws SystemException
SystemException
PCB
public PCB getProcess(WhoAmI id) throws SystemException
id
- The WhoAmI ID of the process.
SystemException
PCB
public PCB getProcess(java.lang.String id) throws SystemException
id
- The String representation of the ID.
SystemException
PCB
public void removeProcess(WhoAmI id)
id
- The WhoAmI ID of the process.public void removeProcess(java.lang.String id)
id
- The String representation of the ID.public PCB getProcessOrganic(java.lang.String organicId) throws SystemException
organicId
- the organic ID.
SystemException
PCB
public void dumpProcessTable(Table<java.lang.String> target) throws SystemException
target
- A table to full.
SystemException
public WhoAmI callerId() throws SystemException
SystemException
public boolean checkClearance(Clearance requiredLevel) throws SystemException
requiredLevel
- The level required by the calling thread to allow the operation.
SystemException
public WhoAmI requireClearance(Clearance requiredLevel, java.lang.String operationName) throws SystemException
requiredLevel
- The level required by the calling thread to allow the operation.operationName
- The name of the operation. This is used to identify an error should the clearance fail.
SystemException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |