org.android.activityminer.app.service
Class IBackgroundService.Stub.Proxy

Package class diagram package IBackgroundService.Stub.Proxy
java.lang.Object
  extended by org.android.activityminer.app.service.IBackgroundService.Stub.Proxy
All Implemented Interfaces:
IInterface, IBackgroundService
Enclosing class:
IBackgroundService.Stub

private static class IBackgroundService.Stub.Proxy
extends Object
implements IBackgroundService


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.android.activityminer.app.service.IBackgroundService
IBackgroundService.Stub
 
Field Summary
private  IBinder mRemote
           
 
Constructor Summary
IBackgroundService.Stub.Proxy(IBinder remote)
           
 
Method Summary
 IBinder asBinder()
           
 void broadcastProgress()
          Triggers a progress broadcast of the current task if there is one active
 boolean doBatchCreateAndExportTrainingData(Configuration baseConfig, long[] windowSizes, long[] sampleRates, double[] gfCutOffs)
          Method to start batch training data creation and export for any combination of the given window sizes and sample rates.
 boolean doCreateModel(Configuration config, String modelName)
          Method to start model creation from a given configuration in the background
 boolean doDBRawDataUpdate(Configuration config)
          Method to trigger db related updates of the raw time series (Gap filling and linear acceleration updates for older DBs).
 boolean doEvaluate(Configuration config, ParcelableFeatureTypeSets featureSets, boolean bestResultsOnly)
          Method to start evaluation in the background
 boolean doExportDatabase(String fileName)
          Method to start database export
 boolean doExportModelFile(String fileName)
          Method to start a model file export
 boolean doExportRecordingData(Configuration config, String fileName)
          Method to start recording data export
 boolean doExportTrainingData(Configuration config, String fileName)
          Method to start training data export
 boolean doExtractFeatures(Configuration config, long[] sequenceIds)
          Method to start feature extraction in the background
 boolean doImportDatabase(String fileName)
          Method to start database import
 boolean doSearchBestFeatureSubset(Configuration config, ParcelableFeatureTypeSets featureSets, int size)
          Method to start a search for the best feature subset of a given size.
 boolean doUpdateLinearAccelerations(Configuration config)
          Method to start recalculation of liner acceleration based on the reconstructed raw acceleration values.
 String getCurrentTaskDescription()
          Getter for the current task description
 String getInterfaceDescriptor()
           
 ServiceState getServiceState()
          Getter for the service state
 void stopSelf()
          Signals the service to stop itself when idle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mRemote

private IBinder mRemote
Constructor Detail

IBackgroundService.Stub.Proxy

IBackgroundService.Stub.Proxy(IBinder remote)
Method Detail

asBinder

public IBinder asBinder()
Specified by:
asBinder in interface IInterface

getInterfaceDescriptor

public String getInterfaceDescriptor()

doExtractFeatures

public boolean doExtractFeatures(Configuration config,
                                 long[] sequenceIds)
                          throws RemoteException
Method to start feature extraction in the background

Specified by:
doExtractFeatures in interface IBackgroundService
Parameters:
config - the configuration to use
sequenceIds - a list with the identifiers of the continuous recording aequences to extract features from
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

getServiceState

public ServiceState getServiceState()
                             throws RemoteException
Getter for the service state

Specified by:
getServiceState in interface IBackgroundService
Returns:
the service state
Throws:
RemoteException

doEvaluate

public boolean doEvaluate(Configuration config,
                          ParcelableFeatureTypeSets featureSets,
                          boolean bestResultsOnly)
                   throws RemoteException
Method to start evaluation in the background

Specified by:
doEvaluate in interface IBackgroundService
Parameters:
config - the configuration to use
featureSets - a set of feature sets to evaluate
bestResultsOnly - flag to limit the result list to the best results (ranked by overall prediction accuracy)
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doSearchBestFeatureSubset

public boolean doSearchBestFeatureSubset(Configuration config,
                                         ParcelableFeatureTypeSets featureSets,
                                         int size)
                                  throws RemoteException
Method to start a search for the best feature subset of a given size.

Specified by:
doSearchBestFeatureSubset in interface IBackgroundService
Parameters:
config - the configuration to use
featureSets - a set with a single set of features to search in
size - the subset size
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doCreateModel

public boolean doCreateModel(Configuration config,
                             String modelName)
                      throws RemoteException
Method to start model creation from a given configuration in the background

Specified by:
doCreateModel in interface IBackgroundService
Parameters:
config - the configuration to use
modelName - the model name to use
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

getCurrentTaskDescription

public String getCurrentTaskDescription()
                                 throws RemoteException
Getter for the current task description

Specified by:
getCurrentTaskDescription in interface IBackgroundService
Returns:
the current task description
Throws:
RemoteException

stopSelf

public void stopSelf()
              throws RemoteException
Signals the service to stop itself when idle

Specified by:
stopSelf in interface IBackgroundService
Throws:
RemoteException

broadcastProgress

public void broadcastProgress()
                       throws RemoteException
Triggers a progress broadcast of the current task if there is one active

Specified by:
broadcastProgress in interface IBackgroundService
Throws:
RemoteException

doExportTrainingData

public boolean doExportTrainingData(Configuration config,
                                    String fileName)
                             throws RemoteException
Method to start training data export

Specified by:
doExportTrainingData in interface IBackgroundService
Parameters:
config - the current configuration
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doExportRecordingData

public boolean doExportRecordingData(Configuration config,
                                     String fileName)
                              throws RemoteException
Method to start recording data export

Specified by:
doExportRecordingData in interface IBackgroundService
Parameters:
config - the current configuration
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doExportDatabase

public boolean doExportDatabase(String fileName)
                         throws RemoteException
Method to start database export

Specified by:
doExportDatabase in interface IBackgroundService
Parameters:
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doExportModelFile

public boolean doExportModelFile(String fileName)
                          throws RemoteException
Method to start a model file export

Specified by:
doExportModelFile in interface IBackgroundService
Parameters:
fileName - the model file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doImportDatabase

public boolean doImportDatabase(String fileName)
                         throws RemoteException
Method to start database import

Specified by:
doImportDatabase in interface IBackgroundService
Parameters:
fileName - the destination file name
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doBatchCreateAndExportTrainingData

public boolean doBatchCreateAndExportTrainingData(Configuration baseConfig,
                                                  long[] windowSizes,
                                                  long[] sampleRates,
                                                  double[] gfCutOffs)
                                           throws RemoteException
Method to start batch training data creation and export for any combination of the given window sizes and sample rates.

Specified by:
doBatchCreateAndExportTrainingData in interface IBackgroundService
Parameters:
baseConfig - the basic configuration
windowSizes - the window sizes
sampleRates - the sample rates
Returns:
true if request can be performed, false otherwise (e.g. if another task is already running)
Throws:
RemoteException

doUpdateLinearAccelerations

public boolean doUpdateLinearAccelerations(Configuration config)
                                    throws RemoteException
Method to start recalculation of liner acceleration based on the reconstructed raw acceleration values.

Specified by:
doUpdateLinearAccelerations in interface IBackgroundService
Parameters:
config - the current configuration
Throws:
RemoteException

doDBRawDataUpdate

public boolean doDBRawDataUpdate(Configuration config)
                          throws RemoteException
Method to trigger db related updates of the raw time series (Gap filling and linear acceleration updates for older DBs).

Specified by:
doDBRawDataUpdate in interface IBackgroundService
Parameters:
config - the current configuration
Throws:
RemoteException