de.unikassel.android.sdcframework.persistence
Class StopServiceStrategy

Package class diagram package StopServiceStrategy
java.lang.Object
  extended by de.unikassel.android.sdcframework.util.AbstractChainWorker<PersistentStorageManager>
      extended by de.unikassel.android.sdcframework.persistence.AbstractDatabaseFullStrategy
          extended by de.unikassel.android.sdcframework.persistence.StopServiceStrategy
All Implemented Interfaces:
DatabaseFullStrategy, ChainWorker<PersistentStorageManager>

public class StopServiceStrategy
extends AbstractDatabaseFullStrategy

Implementation of a the database full strategy which does stop the running service.

This strategy does stop the running data collection service. It should always be the last strategy in a chain. To notify the user a NotificationStrategy should be one of it's predecessors.


Field Summary
private  Context context
          The application context
private  Class<? extends SDCService> serviceClass
          The service class
 
Constructor Summary
StopServiceStrategy(Context context, Class<? extends SDCService> serviceClass)
          Constructor
 
Method Summary
 boolean process(PersistentStorageManager storageManager)
          Processing method of the worker
 
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractChainWorker
doWork, getSuccessor, setSuccessor, withSuccessor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.ChainWorker
doWork, getSuccessor, setSuccessor, withSuccessor
 

Field Detail

context

private final Context context
The application context


serviceClass

private final Class<? extends SDCService> serviceClass
The service class

Constructor Detail

StopServiceStrategy

public StopServiceStrategy(Context context,
                           Class<? extends SDCService> serviceClass)
Constructor

Parameters:
context - the application context
serviceClass - the service class
Method Detail

process

public boolean process(PersistentStorageManager storageManager)
Description copied from class: AbstractChainWorker
Processing method of the worker

Overrides:
process in class AbstractDatabaseFullStrategy
Parameters:
storageManager - the client
Returns:
true if successful