roboguice.util
Class RoboThread

java.lang.Object
  extended by java.lang.Thread
      extended by roboguice.util.RoboThread
All Implemented Interfaces:
Runnable

public class RoboThread
extends Thread

An extension to Thread which propogates the current Context to the background thread. Current limitations: any parameters set in the RoboThread are ignored other than Runnable. This means that priorities, groups, names, etc. won't be honored. Yet.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected static com.google.inject.Provider<android.content.Context> contextProvider
           
protected static com.google.inject.Provider<ContextScope> scopeProvider
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
RoboThread()
           
RoboThread(Runnable runnable)
           
 
Method Summary
 void start()
           
 
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

contextProvider

@Inject
protected static com.google.inject.Provider<android.content.Context> contextProvider

scopeProvider

@Inject
protected static com.google.inject.Provider<ContextScope> scopeProvider
Constructor Detail

RoboThread

public RoboThread()

RoboThread

public RoboThread(Runnable runnable)
Method Detail

start

public void start()
Overrides:
start in class Thread


Copyright © 2011. All Rights Reserved.