| |
|
| java.lang.Object java.lang.Thread org.apache.batik.util.HaltingThread
All known Subclasses: org.apache.batik.swing.svg.SVGLoadEventDispatcher, org.apache.batik.swing.svg.SVGDocumentLoader, org.apache.batik.swing.gvt.GVTTreeRenderer, org.apache.batik.swing.svg.GVTTreeBuilder,
HaltingThread | public class HaltingThread extends Thread (Code) | | This is a subclass of java.lang.Thread that includes a non-intrusive
'halt' method. The Halt method simply sets a boolean that can be
checked periodically during expensive processing.
author: deweese version: $Id: HaltingThread.java 478169 2006-11-22 14:23:24Z dvholten $ |
Field Summary | |
protected boolean | beenHalted Boolean indicating if this thread has ever been 'halted'. |
Method Summary | |
public void | clearHalted() Set's beenHalted to false. | public void | halt() Set's beenHalted to true. | public static void | haltThread() Calls 'halt' on Thread.currentThread() if it is an
instance of HaltingThread otherwise it does nothing. | public static void | haltThread(Thread t) Calls 'halt' on t if it is an instance of
HaltingThread otherwise it does nothing. | public static boolean | hasBeenHalted() Returns the result of calling hasBeenHalted on
Thread.currentThread(), if it is an instance of
HaltingThread otherwise it returns false. | public static boolean | hasBeenHalted(Thread t) Returns the result of calling hasBeenHalted on t,
if it is an instance of HaltingThread otherwise it returns false. | public boolean | isHalted() returns true if someone has halted the thread. |
beenHalted | protected boolean beenHalted(Code) | | Boolean indicating if this thread has ever been 'halted'.
|
HaltingThread | public HaltingThread()(Code) | | |
clearHalted | public void clearHalted()(Code) | | Set's beenHalted to false.
|
halt | public void halt()(Code) | | Set's beenHalted to true.
|
haltThread | public static void haltThread()(Code) | | Calls 'halt' on Thread.currentThread() if it is an
instance of HaltingThread otherwise it does nothing.
|
haltThread | public static void haltThread(Thread t)(Code) | | Calls 'halt' on t if it is an instance of
HaltingThread otherwise it does nothing.
|
hasBeenHalted | public static boolean hasBeenHalted()(Code) | | Returns the result of calling hasBeenHalted on
Thread.currentThread(), if it is an instance of
HaltingThread otherwise it returns false.
|
hasBeenHalted | public static boolean hasBeenHalted(Thread t)(Code) | | Returns the result of calling hasBeenHalted on t,
if it is an instance of HaltingThread otherwise it returns false.
|
isHalted | public boolean isHalted()(Code) | | returns true if someone has halted the thread.
|
|
|
|