|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.appengine.api.ThreadManager
public final class ThreadManager
ThreadManager exposes a ThreadFactory that allows
App Engine applications to spawn new threads.
| Constructor Summary | |
|---|---|
ThreadManager()
|
|
| Method Summary | |
|---|---|
static java.lang.Thread |
createThreadForCurrentRequest(java.lang.Runnable runnable)
Create a new Thread that executs runnable. |
static java.util.concurrent.ThreadFactory |
currentRequestThreadFactory()
Returns a ThreadFactory that will create threads scoped
to the current request. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadManager()
| Method Detail |
|---|
public static java.util.concurrent.ThreadFactory currentRequestThreadFactory()
ThreadFactory that will create threads scoped
to the current request. These threads will be interrupted at the
end of the current request and must complete within the request
deadline.
Your code has limited access to the threads created by this
ThreadFactory. For example, you can call
Thread.setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) and
Thread.interrupt(), but not Thread.stop() or any
other methods that require
RuntimePermission("modifyThread").
public static java.lang.Thread createThreadForCurrentRequest(java.lang.Runnable runnable)
runnable. Calling this
method is equivalent to invoking ThreadFactory#run on the
ThreadFactory returned from {#link #currentRequestThreadFactory}.
This thread will be interrupted at the end of the current request
and must complete within the request deadline.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||