public class OperationThread
extends java.lang.Thread
Available in ZK PE and ZK EE.
OperationThread has only one instance in each desktop, it store it-self in the desktop by setAttribute.
It create and monitor the OperationQueue
, if there are any operation in queue, it will consume it.
Modifier and Type | Method and Description |
---|---|
static void |
destroyWith(Desktop desktop)
Terminate a OperationThread which is stored in desktop and clear it.
|
static OperationQueue |
getQueue(Desktop desktop)
Get the
OperationQueue of OperationThread,
It is check is there any OperationThread exist in desktop. |
boolean |
isRunning()
Is this thread still running
|
void |
run() |
void |
terminate()
Terminate this thread. thread will be stopped after last run trip.
|
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, start, stop, stop, suspend, toString, yield
public static OperationQueue getQueue(Desktop desktop)
OperationQueue
of OperationThread,
It is check is there any OperationThread exist in desktop.
If no, create one ,start it and store in desktop, then return thread's operation queue.
If yes, return operation queue directly.
There is only one OperationThread in each desktop.desktop
- the associated desktoppublic static void destroyWith(Desktop desktop)
desktop
- the associated desktoppublic boolean isRunning()
public void terminate()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.