de.unikassel.android.sdcframework.service
Class ShutdownStrategy

Package class diagram package ShutdownStrategy
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.AbstractTimeProviderErrorStrategy
      extended by de.unikassel.android.sdcframework.service.ShutdownStrategy
All Implemented Interfaces:
TimeProviderErrorStrategy

public class ShutdownStrategy
extends AbstractTimeProviderErrorStrategy

Simple shutdown strategy in case of time provider synchronization errors.


Field Summary
private static String SYNC_ERROR
          The sync error message.
 
Constructor Summary
ShutdownStrategy()
          Constructor
 
Method Summary
 void finalize(Context context)
          Does finalize the strategy.
 boolean handleTimeErrorEvent(TimeErrorEvent event, ServiceManager serviceManager)
          Handler for error events (e.g.
 void prepare(Context context)
          Does prepare the strategy.
 
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

SYNC_ERROR

private static final String SYNC_ERROR
The sync error message.

See Also:
Constant Field Values
Constructor Detail

ShutdownStrategy

public ShutdownStrategy()
Constructor

Method Detail

handleTimeErrorEvent

public final boolean handleTimeErrorEvent(TimeErrorEvent event,
                                          ServiceManager serviceManager)
Description copied from interface: TimeProviderErrorStrategy
Handler for error events (e.g. time provider out of sync)

Parameters:
event - the error event
serviceManager - the service manager
Returns:
true if the error was handled properly, false otherwise

prepare

public final void prepare(Context context)
Description copied from interface: TimeProviderErrorStrategy
Does prepare the strategy.

Parameters:
context - the application context

finalize

public final void finalize(Context context)
Description copied from interface: TimeProviderErrorStrategy
Does finalize the strategy.

Parameters:
context - the application context