org.android.activityminer.app.util
Class DeleteAllTrainingSamplesTask
java.lang.Object
android.os.AsyncTask<Void,Integer,Void>
org.android.activityminer.app.util.DeleteAllTrainingSamplesTask
- All Implemented Interfaces:
- ObservableEventSource<TaskFinishedEvent>, ObserverRegistration<TaskFinishedEvent>
public class DeleteAllTrainingSamplesTask
- extends AsyncTask<Void,Integer,Void>
- implements ObservableEventSource<TaskFinishedEvent>
Asynchronous task to delete all existing training data in DB.
Methods inherited from class android.os.AsyncTask |
cancel, execute, execute, executeOnExecutor, get, get, getStatus, isCancelled, onCancelled, onCancelled, onProgressUpdate, publishProgress |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
progressDialog
private ProgressDialog progressDialog
- The progress dialog.
context
private final Context context
- The context.
observableEventSource
private final ObservableEventSource<TaskFinishedEvent> observableEventSource
- The observable event source for delegation.
DeleteAllTrainingSamplesTask
public DeleteAllTrainingSamplesTask(Context context,
EventObserver<TaskFinishedEvent> observer)
- Constructor
- Parameters:
context
- the contextobserver
- an optional event observer for the task finished event
DeleteAllTrainingSamplesTask
public DeleteAllTrainingSamplesTask(Context context)
- Constructor
- Parameters:
context
- the context
onPreExecute
protected void onPreExecute()
- Overrides:
onPreExecute
in class AsyncTask<Void,Integer,Void>
onPostExecute
protected final void onPostExecute(Void result)
- Overrides:
onPostExecute
in class AsyncTask<Void,Integer,Void>
doInBackground
protected Void doInBackground(Void... params)
- Specified by:
doInBackground
in class AsyncTask<Void,Integer,Void>
registerEventObserver
public void registerEventObserver(EventObserver<? extends TaskFinishedEvent> observer)
- Specified by:
registerEventObserver
in interface ObserverRegistration<TaskFinishedEvent>
unregisterEventObserver
public void unregisterEventObserver(EventObserver<? extends TaskFinishedEvent> observer)
- Specified by:
unregisterEventObserver
in interface ObserverRegistration<TaskFinishedEvent>
removeAllObservers
public void removeAllObservers()
- Specified by:
removeAllObservers
in interface ObserverRegistration<TaskFinishedEvent>
notify
public void notify(TaskFinishedEvent data)
- Specified by:
notify
in interface ObservableEventSource<TaskFinishedEvent>
hasObservers
public boolean hasObservers()
- Specified by:
hasObservers
in interface ObservableEventSource<TaskFinishedEvent>