|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unikassel.android.sdcframework.util.AbstractTimeProviderErrorStrategy
de.unikassel.android.sdcframework.service.TimeProviderOutOfSyncIgnoreStrategy
public class TimeProviderOutOfSyncIgnoreStrategy
Simple ignore strategy in case of time provider synchronization errors.
Field Summary | |
---|---|
private ObservableAlarm |
alarm
The alarm for retry attempts. |
private EventObserver<AlarmEvent> |
alarmObserver
The alarm observer to delegate to. |
private NetworkConnectionObserver |
connectionObserver
The network connection observer |
private ServiceManager |
manager
The service manager. |
private static long |
RETRY_SYNC_OFFSET
The time offset for synchronization retries. |
private boolean |
timeSyncStateDeviceWasEnabeled
The flag is the time sync state device was enabled or not. |
Constructor Summary | |
---|---|
TimeProviderOutOfSyncIgnoreStrategy(ServiceManager manager)
Constructor |
Method Summary | |
---|---|
void |
finalize(Context context)
Does finalize the strategy. |
boolean |
handleTimeErrorEvent(TimeErrorEvent event,
ServiceManager serviceManager)
Handler for error events (e.g. |
void |
onEvent(ObservableEventSource<? extends NetworkStateChangeEvent> eventSource,
NetworkStateChangeEvent observedEvent)
This method is called whenever the observed object does create an observed event |
void |
prepare(Context context)
Does prepare the strategy. |
protected void |
startSyncProcess()
Method to trigger a synchronization process |
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractTimeProviderErrorStrategy |
---|
getDescription |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final long RETRY_SYNC_OFFSET
private final ObservableAlarm alarm
private final EventObserver<AlarmEvent> alarmObserver
private final ServiceManager manager
private boolean timeSyncStateDeviceWasEnabeled
private final NetworkConnectionObserver connectionObserver
Constructor Detail |
---|
public TimeProviderOutOfSyncIgnoreStrategy(ServiceManager manager)
manager
- the service managerMethod Detail |
---|
public final boolean handleTimeErrorEvent(TimeErrorEvent event, ServiceManager serviceManager)
TimeProviderErrorStrategy
handleTimeErrorEvent
in interface TimeProviderErrorStrategy
event
- the error eventserviceManager
- the service manager
public final void prepare(Context context)
TimeProviderErrorStrategy
prepare
in interface TimeProviderErrorStrategy
context
- the application contextpublic final void finalize(Context context)
TimeProviderErrorStrategy
finalize
in interface TimeProviderErrorStrategy
context
- the application 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 objectprotected void startSyncProcess()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |