|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
de.unikassel.android.sdcframework.util.AbstractWorkerThread
org.android.activityminer.app.util.ObservableWorkerThreadWithProgressNotification
org.android.activityminer.logic.util.FileCopyThread
public class FileCopyThread
The file copy thread.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
private Context |
context
The context. |
private File |
destFile
The destination file. |
private static int |
FILE_COPY_NOTIFICATION_ID
the file copy notification identifier |
private String |
lastError
The last error |
private File |
srcFile
The source file. |
private boolean |
succeeded
The success state flag |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
FileCopyThread(Context context,
File srcFile,
File destFile,
Class<? extends Activity> intentReceiver)
Constructor |
Method Summary | |
---|---|
static ObservableWorkerThreadWithProgressNotification |
createAndRun(Context context,
File srcFile,
File destFile,
EventObserver<TaskFinishedEvent> finishedObserver,
Class<? extends Activity> intentReceiver)
Does create and execute a file copy thread. |
protected void |
doWork()
|
protected Context |
getContext()
Getter for the context |
protected String |
getDestFileName()
Getter for the destination file name |
protected String |
getDestFilePath()
Getter for the destination file path |
String |
getErrorNotificationMsg()
Getter for the error notification message |
int |
getNotificationId()
Getter for the notification identifier |
String |
getResultNotificationMsg()
Getter for the result notification message |
protected String |
getSrcFileName()
Getter for the source file name |
boolean |
hasSucceeded()
Test method for success in case of termination |
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 |
Field Detail |
---|
private static final int FILE_COPY_NOTIFICATION_ID
private final File srcFile
private final File destFile
private boolean succeeded
private String lastError
private final Context context
Constructor Detail |
---|
protected FileCopyThread(Context context, File srcFile, File destFile, Class<? extends Activity> intentReceiver)
context
- the application contextsrcFile
- the source filedestFile
- the destination fileintentReceiver
- the intent receiver classMethod Detail |
---|
protected Context getContext()
protected final String getSrcFileName()
protected final String getDestFileName()
protected final String getDestFilePath()
public final String getErrorNotificationMsg()
ObservableWorkerThreadWithProgressNotification
getErrorNotificationMsg
in class ObservableWorkerThreadWithProgressNotification
public String getResultNotificationMsg()
ObservableWorkerThreadWithProgressNotification
getResultNotificationMsg
in class ObservableWorkerThreadWithProgressNotification
public final int getNotificationId()
ObservableWorkerThreadWithProgressNotification
getNotificationId
in class ObservableWorkerThreadWithProgressNotification
public final boolean hasSucceeded()
ObservableWorkerThreadWithProgressNotification
hasSucceeded
in class ObservableWorkerThreadWithProgressNotification
protected final void doWork()
doWork
in class AbstractWorkerThread
public static ObservableWorkerThreadWithProgressNotification createAndRun(Context context, File srcFile, File destFile, EventObserver<TaskFinishedEvent> finishedObserver, Class<? extends Activity> intentReceiver)
context
- the context of the callersrcFile
- the source filedestFile
- the destination filefinishedObserver
- the finished event observerintentReceiver
- the intent receiver class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |