|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--FishClientDownloadThread
Thread that setup communication and do the actual downloading of the requested file propagated from FishClientDownload class.
Field Summary | |
protected int |
currentBytes
Number of bytes downloaded |
protected double |
currentSpeed
Holds calculated average download speed in kBytes/second |
protected boolean |
DONE
Used to indicate if download is completed |
protected boolean |
ERROR
Used to indicate if an error in download process has ocurred |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
FishClientDownloadThread(java.lang.String ipAddress,
int port,
java.lang.String fileName,
int count,
int fileSize)
Open connection to the serverpart of the client holding the wanted file. |
Method Summary | |
void |
run()
Authorize with the other client and check if file still is shared, then starts downloading it. |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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 boolean DONE
protected boolean ERROR
protected int currentBytes
protected double currentSpeed
Constructor Detail |
public FishClientDownloadThread(java.lang.String ipAddress, int port, java.lang.String fileName, int count, int fileSize)
ipAddress
- IP-address of remote user.port
- Portnumber serving downloads.fileName
- Name of desired file.count
- Index of desired file in the remote users table of locally shared files.fileSize
- Size of desired file.Method Detail |
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |