|
Babylon Java Chat | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.lang.Thread
BabylonFileTransfer
BabylonServerFileTransfer
public class BabylonServerFileTransfer
The thread that runs file transfers on the server side. This class
inherits from the generic, abstract BabylonFileTransfer class.
It accepts incoming file blocks from the sending client, and sends them
out to receiving clients in a coordinated way, until all users have either
refused or received the file. If there are no more users receiving and
the expiry time has been reached (even if there are still users who have
neither accepted or declined) the thread terminates.
| 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 BabylonFileTransfer |
|---|
blockSize, DEFAULT_BLOCKSIZE, expireMins, expiryTime, fileName, receivedAll, receivedBlocks, tmpFile, totalBlocks, totalSize, transFile |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
BabylonServerFileTransfer(BabylonServerConnection c,
java.lang.String fn,
long ts,
int tb,
int bs,
int minutes,
java.util.Vector iu)
|
|
| Method Summary | |
|---|---|
void |
addUser(BabylonServerConnection c)
Add an invited user who has accepted the invitation to the list of participating users and begin sending file blocks. |
void |
cancel()
Terminate the file transfer. |
boolean |
removeUser(BabylonServerConnection c)
Remove a user from the list of participating users. |
void |
run()
Loops through all of the transfer users, transferring file blocks to them. |
| Methods inherited from class BabylonFileTransfer |
|---|
getFileBlock, putFileBlock |
| 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 |
|---|
public BabylonServerFileTransfer(BabylonServerConnection c,
java.lang.String fn,
long ts,
int tb,
int bs,
int minutes,
java.util.Vector iu)
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablerun in class BabylonFileTransferpublic void addUser(BabylonServerConnection c)
public boolean removeUser(BabylonServerConnection c)
public void cancel()
|
Babylon Java Chat | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||