public class SandboxEnvironmentThread extends MetadataEnvironmentThread
SandboxEnvironmentShell
to execute tasks that
must be performed in a specific sandbox environment. If the current thread
is an instance of this class, it is guaranteed that
SandboxEnvironment.getCurrent()
will return an instance bound
to the sandbox specified by getSandboxId()
of this class.MetadataEnvironmentThread.Resources, MetadataEnvironmentThread.Tracer
Modifier | Constructor and Description |
---|---|
protected |
SandboxEnvironmentThread(SandboxEnvironmentShell shell,
MetadataEnvironmentShell.Variables variables,
java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name,
long stackSize,
java.lang.String sandboxId)
Creates a new thread that's confined to a sandbox environment.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSandboxId()
Returns the ID of the sandbox this thread is confined to.
|
beginTrace, endTrace, get, getCurrentTracer, getMetadataEnvironmentShell, isSet, run, start
activeCount, checkAccess, clone, 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, stop, stop, suspend, toString, yield
protected SandboxEnvironmentThread(SandboxEnvironmentShell shell, MetadataEnvironmentShell.Variables variables, java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize, java.lang.String sandboxId)
shell
- the metadata environment shell that creates this threadvariables
- the variables to be set in this thread, null
if no variables need to be setgroup
- the thread grouptarget
- the object whose run
method is calledname
- the name of the new methodstackSize
- the desired stack size for the new thread, or zero to
indicate that this parameter is to be ignoredsandboxId
- the ID of the sandboxjava.lang.IllegalArgumentException
- if the given metadata environment
shell is null or the sandbox ID is null