org.android.activityminer.logic.util
Class LooperThread

Package class diagram package LooperThread
java.lang.Object
  extended by java.lang.Thread
      extended by org.android.activityminer.logic.util.LooperThread
All Implemented Interfaces:
Runnable

public class LooperThread
extends Thread

A looper thread with a handler and an associated message queue to post Runnables to.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  Handler handler
          The handler
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
LooperThread()
          Constructor
 
Method Summary
 void doTerminate()
          Does terminate the thread and quits the looper
 boolean postDelayed(Runnable r, long delay)
          Does post a runnable to the associated handler
 void removeCallbacks(Runnable r)
          Does post a runnable to the associated handler
 void run()
           
 
Methods inherited from class java.lang.Thread
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
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

handler

private Handler handler
The handler

Constructor Detail

LooperThread

public LooperThread()
Constructor

Method Detail

run

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

doTerminate

public final void doTerminate()
Does terminate the thread and quits the looper


postDelayed

public final boolean postDelayed(Runnable r,
                                 long delay)
Does post a runnable to the associated handler

Parameters:
r - the runnable to execute delayed
delay - the delay in milliseconds
Returns:
true if successful

removeCallbacks

public final void removeCallbacks(Runnable r)
Does post a runnable to the associated handler

Parameters:
r - the runnable to remove call backs for