|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
sk.robotics.rlcs.security.Trusted
public class Trusted
This class provides a way to execude some code in a thread with more privileges than the calling thread.
Of course, threads of this class have no permissions, only subclasses explicitely allowed in SecurityManager are granted permissions specified through methods of this class.
Threads of this class, as opposed to Restricted threads, are not spawned on demand, because that would require special permissions from the calling thread. Instead, multiple request are queued (serialized) and executed in single instance of a thread of this class.
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 java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
Trusted(java.lang.String name,
java.security.Permissions perms)
Constructor creates and starts the thread, initializing set of permissions. |
Method Summary | |
---|---|
void |
exec(java.lang.Runnable target)
Execute a Runnable target in this thread. |
java.security.Permissions |
getPermissions()
Get set of permissions associated with this thread. |
void |
run()
The thread function. |
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected Trusted(java.lang.String name, java.security.Permissions perms)
Method Detail |
---|
public java.security.Permissions getPermissions()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void exec(java.lang.Runnable target)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |