org.android.activityminer.logic.util
Class DatabaseImportThread

Package class diagram package DatabaseImportThread
java.lang.Object
  extended by java.lang.Thread
      extended by de.unikassel.android.sdcframework.util.AbstractWorkerThread
          extended by org.android.activityminer.app.util.ObservableWorkerThreadWithProgressNotification
              extended by org.android.activityminer.logic.util.FileCopyThread
                  extended by org.android.activityminer.logic.util.DatabaseImportThread
All Implemented Interfaces:
ObservableEventSource<TaskFinishedEvent>, ObserverRegistration<TaskFinishedEvent>, WorkerThread, Runnable

public class DatabaseImportThread
extends FileCopyThread

The database import thread.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
private DatabaseImportThread(Context context, File srcFile, Class<? extends Activity> intentReceiver)
          Constructor
 
Method Summary
static ObservableWorkerThreadWithProgressNotification createAndRun(Context context, File srcFile, EventObserver<TaskFinishedEvent> finishedObserver, Class<? extends Activity> intentReceiver)
          Does create and execute a database import thread.
 String getResultNotificationMsg()
          Getter for the result notification message
 
Methods inherited from class org.android.activityminer.logic.util.FileCopyThread
createAndRun, doWork, getContext, getDestFileName, getDestFilePath, getErrorNotificationMsg, getNotificationId, getSrcFileName, hasSucceeded
 
Methods inherited from class org.android.activityminer.app.util.ObservableWorkerThreadWithProgressNotification
broadcastProgress, doCleanUp, getApplicationContext, getFinalResult, getMaxProgress, getNotification, getTaskTitle, hasObservers, incrementAndNotifyProgress, incrementAndNotifyProgress, notify, notifyProgress, notifyProgress, registerEventObserver, removeAllObservers, setMaxProgress, unregisterEventObserver
 
Methods inherited from class de.unikassel.android.sdcframework.util.AbstractWorkerThread
doTerminate, hasTerminated, isLogging, isWorking, logMessage, run, setLogging, start, startWork, stopWork
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DatabaseImportThread

private DatabaseImportThread(Context context,
                             File srcFile,
                             Class<? extends Activity> intentReceiver)
Constructor

Parameters:
context - the application context
srcFile - the source file
intentReceiver - the intent receiver class
Method Detail

getResultNotificationMsg

public String getResultNotificationMsg()
Description copied from class: ObservableWorkerThreadWithProgressNotification
Getter for the result notification message

Overrides:
getResultNotificationMsg in class FileCopyThread
Returns:
the result notification message

createAndRun

public static final ObservableWorkerThreadWithProgressNotification createAndRun(Context context,
                                                                                File srcFile,
                                                                                EventObserver<TaskFinishedEvent> finishedObserver,
                                                                                Class<? extends Activity> intentReceiver)
Does create and execute a database import thread.

Parameters:
context - the context of the caller
srcFile - the source file
finishedObserver - the finished event observer
intentReceiver - the intent receiver class
Returns:
the created database import thread