java.lang.Object
edu.emory.mathcs.util.concurrent.DelegatedRunnable
- All Implemented Interfaces:
- java.lang.Runnable
- public class DelegatedRunnable
- extends java.lang.Object
- implements java.lang.Runnable
Wrapper for a runnable that ensures that further executions
(even if performed by different threads) inherit current access control
context and ThreadContext. In particular, the task will always
run with the same access permissions,
delegatable thread locals,
and context class loader, determined
at the time of creation of this DelegatedRunnable.
- Version:
- 1.0
|
Method Summary |
void |
run()
Execute wrapped runnable within access control
context and ThreadContext associated to this object at
the creation time. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
runnable
final java.lang.Runnable runnable
acc
final java.security.AccessControlContext acc
tc
final ThreadContext tc
DelegatedRunnable
public DelegatedRunnable(java.lang.Runnable runnable)
- Construct new DelegatedRunnable wrapper for a given task.
run
public void run()
- Execute wrapped runnable within access control
context and ThreadContext associated to this object at
the creation time. In particular, the task will run with the same
access permissions,
delegatable thread locals,
and context class loader, as seen when this object was created.
- Specified by:
run in interface java.lang.Runnable