|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--ip1.ex14.JFtpThread
|
+--ip1.ex14.JFtp
JFtp is a multi-threaded graphical FTP client. The JFtp class implements the program's main thread which handles user itneraction and can fire up FTP control threads.
JFtpThread,
JFtpControl| Nested Class Summary | |
(package private) class |
JFtp.RefreshTask
A TimerTask to refresh JFtp's thread view. |
class |
JFtp.RootQueueItem
|
| Nested classes inherited from class ip1.ex14.JFtpThread |
|
| Field Summary | |
protected int |
argMaxThreads
Do we use multithread? |
protected boolean |
argPassive
Do we use passive mode ? |
protected java.lang.String |
argUrl
Initial URL. |
protected java.io.File |
localDir
The local working directory. |
protected JFtpWindow |
mainWindow
JFtp's main window. |
protected static java.lang.String |
version
Program version. |
| Fields inherited from class ip1.ex14.JFtpThread |
children, counter, id, node, parent, queue, state, STATE_EXITED, STATE_NOTRUNNING, STATE_SHUTDOWN, threadTree, threadTreeChanged, type |
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
JFtp(java.lang.String[] argv)
The constructor parses the command line arguments. |
|
| Method Summary | |
protected void |
connect(java.net.URL u)
Connects to an FTP server. |
void |
debug(java.lang.String msg)
Displays a message both in applet and standard output. |
protected void |
delete(JFtpEntry entry)
Delete a file. |
protected void |
dispRemote(java.util.Vector contents)
Change the contents of the remote file list. |
private boolean |
download(JFtpEntry entry)
Download a file. |
private JFtpControl |
getAuxControl(java.net.URL url)
Return an auxilary control connection. |
protected JFtpControl |
getControl()
Return the active control connection. |
void |
localCwd(java.lang.String dir)
Change the local working directory. |
static void |
main(java.lang.String[] argv)
The program's main routine. |
void |
queueDownload(JFtpEntry entry)
Queue the download of a file. |
void |
queueUpload(JFtpEntry entry)
Queue the upload of a file. |
protected void |
refreshLocalList()
Refresh local file list. |
protected void |
refreshRemoteList()
Refresh the remote file list. |
protected void |
refreshUrl()
Change the current URL in the window. |
protected void |
removeChild(JFtpControl theThread)
Remove a control thread. |
void |
run()
Thread entry point. |
protected void |
setPassive(boolean passive)
Set active or passive mode. |
private boolean |
upload(JFtpEntry entry)
Upload a file. |
private void |
usage()
Display program usage. |
| Methods inherited from class ip1.ex14.JFtpThread |
addChild, addQueue, dumpQueue, getChild, getRoot, isBusy, peekQueue, propagateTreeChange, queueShutdown, readQueue, refreshNode, refreshThreadView, removeChild, reset, shutdown, toString, waitShutdown |
| 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, yield |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final java.lang.String version
protected JFtpWindow mainWindow
protected java.lang.String argUrl
protected boolean argPassive
protected int argMaxThreads
protected java.io.File localDir
| Constructor Detail |
public JFtp(java.lang.String[] argv)
argv - the command line arguments| Method Detail |
public void debug(java.lang.String msg)
debug in class JFtpThreadmsg - the message to printprivate boolean download(JFtpEntry entry)
protected void delete(JFtpEntry entry)
entry - the entry to deleteJFtpWindow.actionPerformed(java.awt.event.ActionEvent)protected void dispRemote(java.util.Vector contents)
public void localCwd(java.lang.String dir)
dir - the directory to change toprivate JFtpControl getAuxControl(java.net.URL url)
getControl()protected JFtpControl getControl()
getAuxControl(java.net.URL)public static void main(java.lang.String[] argv)
run()protected void connect(java.net.URL u)
u - the URL to connect toJFtpWindow.actionPerformed(java.awt.event.ActionEvent)public void queueDownload(JFtpEntry entry)
download(ip1.ex14.JFtpEntry),
JFtpWindow.actionPerformed(java.awt.event.ActionEvent)public void queueUpload(JFtpEntry entry)
entry - the entry to uploadupload(ip1.ex14.JFtpEntry),
JFtpWindow.actionPerformed(java.awt.event.ActionEvent)protected void removeChild(JFtpControl theThread)
JFtpThread.removeChild(ip1.ex14.JFtpThread),
refreshRemoteList()protected void refreshLocalList()
JFtpWindow.actionPerformed(java.awt.event.ActionEvent)protected void refreshRemoteList()
dispRemote(java.util.Vector),
JFtpControl.queueList()protected void refreshUrl()
public void run()
run in interface java.lang.Runnablerun in class JFtpThreadprotected void setPassive(boolean passive)
private boolean upload(JFtpEntry entry)
queueUpload(ip1.ex14.JFtpEntry)private void usage()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||