|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread net.sf.tacos.demo.pages.forms.ImportWorker
public class ImportWorker
Imports a file from a form.
ProgressBar
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
Thread.State, Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected org.apache.tapestry.request.IUploadFile |
file
uploading file bytestream |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ImportWorker(org.apache.tapestry.request.IUploadFile file)
Creates a new instance of thread that will manage importing the specified file. |
Method Summary | |
---|---|
void |
cancelTask()
Can be invoked by a user inpatient to see the request completed. |
double |
getCurrentProgress()
Should represent a number value indicating the current progress value out of the total derived in ProgressWorker.getTotalProgress() . |
String |
getCurrentStatus()
If value not null will be used to display any textual information that may be useful to see along with the basic numeric values. |
double |
getTotalProgress()
The total value that this progress represents. |
boolean |
isComplete()
Should return true once the task is completed. |
void |
run()
|
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, 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, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected org.apache.tapestry.request.IUploadFile file
Constructor Detail |
---|
public ImportWorker(org.apache.tapestry.request.IUploadFile file) throws IOException
file
- The file to import
IOException
- if an io error occursMethod Detail |
---|
public double getTotalProgress()
ProgressBar
.
getTotalProgress
in interface ProgressWorker
public double getCurrentProgress()
ProgressWorker.getTotalProgress()
.
getCurrentProgress
in interface ProgressWorker
public String getCurrentStatus()
getCurrentStatus
in interface ProgressWorker
public boolean isComplete()
isComplete
in interface ProgressWorker
public void cancelTask()
ProgressWorker.isComplete()
will return true.
cancelTask
in interface ProgressWorker
public void run()
run
in interface Runnable
run
in class Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |