|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
things.thinger.kernel.ThingsProcess
things.thinger.kernel.basic.KernelBasicBase
things.thinger.kernel.basic.KernelBasic
public class KernelBasic
Implements a system interface for the basic Kernel.
Version History
EPG - Initial - 12 JUN 05 EPG - Split base and main - 6 FEB 06
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class things.thinger.kernel.ThingsProcess |
---|
DEFAULT_NAME, internalResult, myPostLogger, ssi |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Fields inherited from interface things.thinger.SystemInterface |
---|
DEFAULT_REPORTING_THRESHOLD |
Constructor Summary | |
---|---|
KernelBasic()
|
Method Summary | |
---|---|
void |
deathNotice(ThingsException te)
Typically, this is how a process will tell the kernel it is dying, so that the kernel can clear resources. |
void |
flingException(ThingsException te)
Typically, this is a last ditch way for a process or module to pass info to the kernel when something very bad is happening. |
WhoAmI |
getCallingProcessId()
Get process ID for the calling prosess. |
ThingsPropertyViewReader |
getConfigProperties()
Get the read only properties for this for the caller only. |
ThingsPropertyView |
getConfigPropertiesWritable()
Get the configuration properties that are writable. |
ThingsPropertyView |
getGlobalProperties()
Get system global property view |
ThingsPropertyView |
getLocalProperties()
Get local property view for the caller only. |
ThingsPropertyView |
getLocalProperties(java.lang.String id)
Get local property view for the given id. |
ThingsPropertyTree |
getLocalPropertiesImplementation()
Get an empty tree using the preferred, non-persistent implementation for the local host. |
FileSystemLocator |
getLogLocal(java.lang.String id)
Get a local reference to the log if possible. |
ExpressionInterface |
getNamedExpressor(java.lang.String name)
Forge a new named expressor. |
Logger |
getNamedLogger(java.lang.String name)
Forge a new named logger. |
ProcessInterface |
getProcessInterface(java.lang.String id)
Get a process interface. |
Table<java.lang.String> |
getProcessList()
Get the process list. |
ThingsState |
getProcessState(java.lang.String id)
Get the state of a specific process. |
ThingsPropertyView |
getSharedProperties()
Get shared property view for this server. |
ConduitController |
getSystemConduits()
Get the system conduit controller. |
Logger |
getSystemLogger()
Get a system logger for the process. This is implemented with the numbered call GET_SYSTEM_LOGGER. |
Universe |
getUniverse(java.lang.String name)
Get a universe by the local name. |
ThingsPropertyView |
getUserGlobalProperties()
Get user global property view. |
MODULE |
loadModule(java.lang.String name)
Load a module but don't do anything with it. |
THING |
loadThing(java.lang.String name)
Load a thing but don't run it. |
void |
registerProcess(PCB processPCB,
Clearance processClearance)
Register a ready-made PCB. |
void |
requestQuit()
Ask the server to quit. |
SystemSuperInterface |
requestSuperSystemInterface()
Ask the kernel for a SuperSystemInterface. |
java.lang.String |
runThing(java.lang.String name)
Load and run a thing in a new process. |
java.lang.String |
runThing(java.lang.String name,
ExpressionInterface parentExpressor)
Load and run a thing in a new process, giving an expression parent. |
java.lang.String |
runThing(java.lang.String name,
ExpressionInterface parentExpressor,
ThingsPropertyView properties)
Load and run a thing in a new process, giving an expression parent. |
WhoAmI |
startProcess(ThingsProcess processObject,
ThingsPropertyView properties)
Start the passed process. |
WhoAmI |
startProcess(ThingsProcess processObject,
ThingsPropertyView properties,
Clearance processClearance)
Start the passed process. |
void |
waitProcessDone(java.lang.String id)
Wait until the named process if done (meaning any state that satisfies ProcessInterface.ThingsState.isDeadOrDying()==true). |
Methods inherited from class things.thinger.kernel.basic.KernelBasicBase |
---|
bootstrap, constructThingsProcess, destructThingsProcess, executeThingsProcess, forgeLogger, getListenerId, getProcessName, resourceRevocation, resourceRevoked |
Methods inherited from class things.thinger.kernel.ThingsProcess |
---|
acceptHalt, acceptPause, finalize, fix, forceFinalize, forceHalt, getCurrentState, getCurrentStateNumeric, getProcessId, getResult, getStartTime, getThingsState, init, isVerbose, release, releasePause, requestHalt, requestPause, run, screech, verboseOff, verboseOn |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public KernelBasic() throws SystemException
SystemException
Method Detail |
---|
public ThingsPropertyView getGlobalProperties() throws SystemException
SystemException
public ThingsPropertyView getUserGlobalProperties() throws SystemException
SystemException
public ThingsPropertyView getSharedProperties() throws ThingsException
things.thinger.ThingsException
ThingsException
public ThingsPropertyView getConfigPropertiesWritable() throws SystemException
SystemException
public ThingsPropertyView getLocalProperties(java.lang.String id) throws SystemException
id
- String id of the process.
SystemException
public void requestQuit()
public void deathNotice(ThingsException te)
te
- a Things exception that indicates the reason for the death. It may be null if it was normal termination.
SystemException
WhoAmI
public void flingException(ThingsException te)
te
- a Things exception
SystemException
WhoAmI
public WhoAmI startProcess(ThingsProcess processObject, ThingsPropertyView properties) throws java.lang.Throwable
processObject
- This will be a ThingsProcess or subclass.properties
- These are properties to add (or supplant) to the processes specific view before starting the process. It is ok
to pass null if there are none.
java.lang.Throwable
WhoAmI
public WhoAmI startProcess(ThingsProcess processObject, ThingsPropertyView properties, Clearance processClearance) throws java.lang.Throwable
processObject
- This will be a ThingsProcess or subclass.properties
- These are properties to add (or supplant) to the processes specific view before starting the process. It is ok
to pass null if there are none.processClearance
- specify the process clearance level. This must be at or lower than the calling process's clearance.
java.lang.Throwable
WhoAmI
public void registerProcess(PCB processPCB, Clearance processClearance) throws ThingsException
processPCB
- This will be a ready-made PCB.processClearance
- The clearance level. This will be immutable.
ThingsException
public ConduitController getSystemConduits() throws SystemException
SystemException
ConduitController
public Logger getSystemLogger() throws SystemException
SystemException
Logger
public Logger getNamedLogger(java.lang.String name) throws SystemException
name
- the name. It will be unique. It's up to kernel on how the name is resolved.
SystemException
Logger
public ExpressionInterface getNamedExpressor(java.lang.String name) throws SystemException
name
- the name. Generally, it should be unique. It's up to kernel on how the name is resolved and if name reuse is allowed.
SystemException
ExpressionInterface
public FileSystemLocator getLogLocal(java.lang.String id) throws SystemException, java.lang.InterruptedException
NO CLEARANCE REQUIRED.
id
- String id of the process.
SystemException
- for general errors or InterruptedException for thread control. Always let the InterruptedException out.
java.lang.InterruptedException
ProcessInterface
,
FileSystemLocator
public THING loadThing(java.lang.String name) throws SystemException
name
- the name that the loader can use to find it. Typically, the full class name.
SystemException
public MODULE loadModule(java.lang.String name) throws SystemException
name
- the name that the loader can use to find it. Typically, the full class name.
SystemException
public java.lang.String runThing(java.lang.String name) throws SystemException
name
- The name of the thing. The KernalBasic implementation will assume the name is the same as the
full class name. If it cannot find the class in the path, it will fail.
SystemException
public java.lang.String runThing(java.lang.String name, ExpressionInterface parentExpressor) throws SystemException
name
- the resolvable name of the thing.parentExpressor
- the parent expressor.
SystemException
public java.lang.String runThing(java.lang.String name, ExpressionInterface parentExpressor, ThingsPropertyView properties) throws SystemException
name
- the resolvable name of the thing.parentExpressor
- the parent expressor. Set to null if there is no parent.properties
- properties to add to the THING processes specific view.
SystemException
public ThingsPropertyView getLocalProperties() throws SystemException
SystemException
public ThingsPropertyViewReader getConfigProperties() throws SystemException
SystemException
public Table<java.lang.String> getProcessList() throws SystemException
The process list will be a Table.
SystemException
Table
public ThingsState getProcessState(java.lang.String id) throws SystemException
If the process is not found, the state is ProcessInterface.ThingsState.STATE_INVALID.
id
- String id of the process.
NO CLEARANCE REQUIRED.
SystemException
ProcessInterface
public ProcessInterface getProcessInterface(java.lang.String id) throws SystemException
id
- String id of the process.
SystemException
ProcessInterface
public void waitProcessDone(java.lang.String id) throws SystemException, java.lang.InterruptedException
If the process is not found, it will quietly return.
NO CLEARANCE REQUIRED.
id
- String id of the process.
SystemException
- for general errors or InterruptedException for thread control. Always let the InterruptedException out.
java.lang.InterruptedException
ProcessInterface
public SystemSuperInterface requestSuperSystemInterface() throws SystemException
For KernelBasic, anything at or above CLEARANCE.PRIVILEGED can have the supersystem interface, which is most services.
SystemException
SystemSuperInterface
public Universe getUniverse(java.lang.String name) throws SystemException
name
- the local name for the universe
SystemException
Universe
public WhoAmI getCallingProcessId() throws SystemException
SystemException
public ThingsPropertyTree getLocalPropertiesImplementation() throws ThingsException
ThingsException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |