|
|
Class: AbstractFTPSession
Object
|
+--AbstractFTPSession
|
+--FTPSession
|
+--SmalltalkFTPSession
- Package:
- stx:goodies/communication
- Category:
- Net-Communication-FTP
- Version:
- rev:
1.8
date: 2007/06/13 08:33:55
- user: cg
- file: AbstractFTPSession.st directory: goodies/communication
- module: stx stc-classLibrary: communication
- Author:
- Claus Gittinger (extracted code from FTPSession)
Helper class for the FTPServer.
Common code for FTP serverSessions - add concrete subclass
The stuff implemented here realizes the protocol;
real file operations and authorization must be implemented in subclasses.
Methods which should be redefined are found in the 'must be redefined' category.
defaults
-
ftpVersion
-
accessing
-
server: something
-
debugging
-
log: aMessage
-
-
logCommand: aMessage
-
ftp system
-
HELP
-
send all commands supported by FTP server
-
NOOP
-
no instruction command
-
PASS
-
password from user; already readin from USER command
-
PORT
-
-
QUIT
-
shutdown server
-
REIN
-
reinitialize server
-
SITE
-
-
STAT
-
-
SYST
-
-
USER
-
ftp user commands
-
CDUP
-
change to parent directory
-
CWD
-
change working directory
-
DELE
-
delete file or (empty) directory
-
LIST
-
show directory contents; longFormat
-
MKD
-
make directory
-
NLST
-
show directory contents; shortFormat
-
PWD
-
get current working directory
-
RETR
-
-
RMD
-
recursive delete directory
-
STOR
-
-
STOU
-
-
TYPE
-
set mode:
bin (I or i) := #binary
ascii(A or a) := #ascii
must be redefined
-
canChangeWorkingDirectory: newDirectory
-
raise an error: must be redefined in concrete subclass(es)
** This method raises an error - it must be redefined in concrete classes **
-
checkPassword: arg1 for: arg2
-
raise an error: must be redefined in concrete subclass(es)
** This method raises an error - it must be redefined in concrete classes **
-
defaultDirectoryForUser: userName
-
raise an error: must be redefined in concrete subclass(es)
** This method raises an error - it must be redefined in concrete classes **
-
doDELETE: recursive
-
raise an error: must be redefined in concrete subclass(es)
-
doLIST: arg
-
raise an error: must be redefined in concrete subclass(es)
-
doMKD: arg
-
raise an error: must be redefined in concrete subclass(es)
-
doRETR: file onTo: outStream
-
raise an error: must be redefined in concrete subclass(es)
-
doSTORE: arg
-
raise an error: must be redefined in concrete subclass(es)
-
loginUserNeedsPassword: arg
-
raise an error: must be redefined in concrete subclass(es)
** This method raises an error - it must be redefined in concrete classes **
private
-
closeDataConnection
-
-
doReinitialize
-
reinitialize the system; called when:
- user logged out
- system before shutdown
- reinitailze system request
- during startup
-
doUserLoggedIn: aUser
-
setup user context
-
nextCommand
-
reads the next command from socket; if a timeout occurs nil is returned otherwise
the command as symbol and the lastArgument is set to the received argument
-
serveSocket: aSocket
-
private ftp
-
checkAndGetArgFilename
-
-
checkAndGetCWD
-
-
checkAndGetDaTaConnection
-
process
-
clientOn: aSocket
-
process for new client
queries
-
isBinary
-
FTPServer start.
FTPServer startOnPort:portNr.
|