gov.nih.nci.caarray.services.util.httpfileuploadapplet
Class HttpFileUploadThread

java.lang.Object
  extended by java.lang.Thread
      extended by gov.nih.nci.caarray.services.util.httpfileuploadapplet.HttpFileUploadThread
All Implemented Interfaces:
java.lang.Runnable

public class HttpFileUploadThread
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HttpFileUploadThread(java.util.Vector files, HttpUploadParameters up)
          CONSTRUCTOR
 
Method Summary
 void cleanUp()
          Delete temp zip files
 long getBytesSent()
           
 int getCompletionPercent()
           
 java.lang.String getCurrentFileName()
           
 java.lang.String getDurationString()
           
 java.lang.Object[] getFailFiles()
           
 java.lang.String getFailureMessage()
           
 java.lang.String getNotifyReply()
           
 java.lang.Object[] getOkFiles()
           
 java.lang.String getTimeBytes()
           
 boolean isFailed()
           
 boolean isUploadComplete()
           
 boolean isUploadPreparationDone()
           
 boolean notifyServer(java.lang.String mode)
           
 void run()
          The run method to control the upload process.
 void startUpload()
           
 boolean stopUpload()
          To stop the run method of this thread.
 
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
 

Constructor Detail

HttpFileUploadThread

public HttpFileUploadThread(java.util.Vector files,
                            HttpUploadParameters up)
CONSTRUCTOR

Parameters:
files - The container containing all the files to be uploaded.
Method Detail

run

public void run()
The run method to control the upload process.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

stopUpload

public boolean stopUpload()
To stop the run method of this thread. To stop the run method, loader sets isStopped value to true, which will cause the exit of file upload loop when the file being uploaded finished.


cleanUp

public void cleanUp()
Delete temp zip files


isUploadPreparationDone

public boolean isUploadPreparationDone()

getCurrentFileName

public java.lang.String getCurrentFileName()

getCompletionPercent

public int getCompletionPercent()

isFailed

public boolean isFailed()

getFailureMessage

public java.lang.String getFailureMessage()

isUploadComplete

public boolean isUploadComplete()

startUpload

public void startUpload()

notifyServer

public boolean notifyServer(java.lang.String mode)

getNotifyReply

public java.lang.String getNotifyReply()

getOkFiles

public java.lang.Object[] getOkFiles()

getFailFiles

public java.lang.Object[] getFailFiles()

getDurationString

public java.lang.String getDurationString()

getBytesSent

public long getBytesSent()

getTimeBytes

public java.lang.String getTimeBytes()