de.unikassel.android.sdcframework.service.facade
Interface ServiceManager

Package class diagram package ServiceManager
All Superinterfaces:
LifeCycleObject
All Known Implementing Classes:
ServiceManagerImpl

public interface ServiceManager
extends LifeCycleObject

Interface for the sensor data collection service manager.
This is the main service component supervising all other sub services and managers used by the frameworks.

See Also:
ServiceManagerImpl

Method Summary
 void doEnableSampleBroadCasting(boolean doEnable)
          Does enable or disable the sample broadcast feature
 void doEnableSampleStorage(boolean doEnable)
          Does change the persistent storage enabled state.
 void doEnableSampleTransfer(boolean doEnable)
          Does change the sample transfer activation state.
 void doEnableSampling(boolean doEnable)
          Does activate or deactivate the sampling process for the running service.
 void doTriggerSampleTransfer()
          Does manually trigger an instant sample transfer ( with a short delay ).
 Context getContext()
          Getter for the service/application context
 ApplicationPreferenceManager getPreferenceManager()
          Getter for the application preference manager
 SDCService getSDCService()
          Getter for the SDC service
 SensorDeviceManager getSensorDeviceManager()
          Getter for the sensor device manager
 void setSDCService(SDCService service)
          Setter for the SDC service
 void stopServiceByReason(String msg)
          Does stop the service, logs the message as warning and sends a notification.
 
Methods inherited from interface de.unikassel.android.sdcframework.util.facade.LifeCycleObject
onCreate, onDestroy, onPause, onResume
 

Method Detail

setSDCService

void setSDCService(SDCService service)
Setter for the SDC service

Parameters:
service - the SDC service to set

getSDCService

SDCService getSDCService()
Getter for the SDC service

Returns:
the SDC service

stopServiceByReason

void stopServiceByReason(String msg)
Does stop the service, logs the message as warning and sends a notification.

Parameters:
msg - the message to log and for use in notification

getContext

Context getContext()
Getter for the service/application context

Returns:
the context

getPreferenceManager

ApplicationPreferenceManager getPreferenceManager()
Getter for the application preference manager

Returns:
the application preference manager

getSensorDeviceManager

SensorDeviceManager getSensorDeviceManager()
Getter for the sensor device manager

Returns:
the sensor device manager

doEnableSampleBroadCasting

void doEnableSampleBroadCasting(boolean doEnable)
Does enable or disable the sample broadcast feature

Parameters:
doEnable - flag if sample broadcasting shall be enabled or disabled

doEnableSampling

void doEnableSampling(boolean doEnable)
Does activate or deactivate the sampling process for the running service. This will permanent change the corresponding service setting as w

Parameters:
doEnable - flag if sampling shall be active or not

doEnableSampleStorage

void doEnableSampleStorage(boolean doEnable)
Does change the persistent storage enabled state. This will permanent change the corresponding service setting as well.

Parameters:
doEnable - flag if the transfer feature shall be enabled or disabled

doEnableSampleTransfer

void doEnableSampleTransfer(boolean doEnable)
Does change the sample transfer activation state. This will permanent change the corresponding service setting as well.

Parameters:
doEnable - flag if the transfer feature shall be enabled or disabled

doTriggerSampleTransfer

void doTriggerSampleTransfer()
Does manually trigger an instant sample transfer ( with a short delay ). If the sample transfer feature is not enabled, it is activated automatically for a single archive transfer. A manually triggered sample transfer does consider all configured transfer settings but the frequency minimum: It will only take place if at least the configured minimum of samples is available in the database, and the total of transferred samples will not exceed the configured maximum.