com.zwares.base.util
Class StoppableThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.zwares.base.util.StoppableThread
All Implemented Interfaces:
java.lang.Runnable

public abstract class StoppableThread
extends java.lang.Thread


Field Summary
static int RUN
           
static int STOP
           
static int WAIT
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
StoppableThread()
           
 
Method Summary
abstract  void performAction()
           
 void run()
           
 void setState(int state)
           
 void stopImmediately()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STOP

public static final int STOP
See Also:
Constant Field Values

RUN

public static final int RUN
See Also:
Constant Field Values

WAIT

public static final int WAIT
See Also:
Constant Field Values
Constructor Detail

StoppableThread

public StoppableThread()
Method Detail

stopImmediately

public void stopImmediately()
                     throws java.lang.SecurityException
java.lang.SecurityException

setState

public void setState(int state)

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

performAction

public abstract void performAction()