|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
de.unikassel.android.sdcframework.util.AbstractWorkerThread
de.unikassel.android.sdcframework.util.TimeProvider.UpdateThread
class TimeProvider.UpdateThread
Thread for asynchronous time updates
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private int |
attemptCounter
The counter for sync attempts |
private NetworkConnectionObserver |
connectionObserver
the network connection observer |
private Object |
connectionWaitLock
The Connection wait lock |
private Context |
context
The context |
private WakeLockHolder |
lockHolder
The wake lock holder instance |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
TimeProvider.UpdateThread(Context context)
Constructor |
Method Summary | |
---|---|
private boolean |
asynchhronousUpdateTime(Context context)
Method to update the time provider time offset |
protected void |
doCleanUp()
The clean up method executed on termination |
protected void |
doWork()
The working method executed in the running loop if started |
void |
onEvent(ObservableEventSource<? extends NetworkStateChangeEvent> eventSource,
NetworkStateChangeEvent observedEvent)
This method is called whenever the observed object does create an observed event |
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractWorkerThread |
---|
doTerminate, hasTerminated, isLogging, isWorking, logMessage, run, setLogging, start, startWork, stopWork |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final NetworkConnectionObserver connectionObserver
private final WakeLockHolder lockHolder
private final Context context
private int attemptCounter
private final Object connectionWaitLock
Connection
wait lock
Constructor Detail |
---|
public TimeProvider.UpdateThread(Context context)
context
- the contextMethod Detail |
---|
protected void doCleanUp()
AbstractWorkerThread
doCleanUp
in class AbstractWorkerThread
protected void doWork()
AbstractWorkerThread
doWork
in class AbstractWorkerThread
private final boolean asynchhronousUpdateTime(Context context)
context
- the contextpublic void onEvent(ObservableEventSource<? extends NetworkStateChangeEvent> eventSource, NetworkStateChangeEvent observedEvent)
EventObserver
onEvent
in interface EventObserver<NetworkStateChangeEvent>
eventSource
- the event generatorobservedEvent
- the event created by the observed object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |