|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--com.dalsemi.shell.server.Session | +--com.dalsemi.shell.server.ftp.FTPSession
This class encapsulates all functionality for an FTP session. The FTP server listens to port 21 for connection requests. When someone attempts to start an FTP session, they contact port 21. The server spins off a session (an instance of this class) to handle that session. The session allows you to log into the system, then handles the communication between that remote computer and the TINI system. The FTP server and sessions are designed to be multi-threaded, allowing multiple simultaneous FTP connections. List of FTP return codes: 120 Service ready in nnn minutes 125 Data Connection already opening, transfer starting 150 File Status OK, about to open data connection 200 OK 202 Command not implemented 211 System status, or help reply 212 Directory status 213 File Status 214 Help Message 215 NAME system type 220 Service ready for new user 221 Service closing control connection 225 Data connection open , no transfer in progress 226 Closing data connection 227 Entering passive mode (h1 h2 h3 h4 p1 p2) 230 User logged in proceed 250 Requested file action OK completed 257 PATHNAME created 331 User name OK, need password 332 Need account for login 350 Requested action pending further info 421 Service not available, closing control connection 425 Can't open data connection 426 Connection closed, transfer aborted 450 Req file action not taken 451 Req action aborted - local error 452 Req action not taken (out of memory) 500 Syntax 501 Syntax in parameters or arguments 502 Command not implemented 503 Bad sequence of commands 504 Command not implemented for that parameter 530 Not logged in 532 Need acct for storing files 550 Requested action not taken (file not found, no access, etc.)
Inner classes inherited from class com.dalsemi.shell.server.Session |
Session.Login |
Fields inherited from class com.dalsemi.shell.server.Session |
commandHistory,
CURRENT_COMMAND,
CURRENT_DIRECTORY,
currentCommand,
environment,
err,
in,
inCommand,
lastCommand,
loginStack,
myThreadID,
out,
paramsArray,
paramsVector,
password,
prompt,
PROMPT,
retArray,
server,
shutdown,
userName,
welcomeMessage |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Method Summary | |
protected void |
currentCommandFinished()
Called after each command is completed. |
protected void |
exceptionThrown(java.lang.Exception ex)
Called when an exception is thrown in a command. |
java.lang.String |
getNextCommand()
Gets the next command from this session's input stream. |
void |
login()
Logs the user into the system. |
protected void |
sessionEnding()
Called to clean up when the session is ending. |
Methods inherited from class com.dalsemi.shell.server.Session |
addToHistory,
broadcast,
endSession,
execute,
forceEndSession,
getEnvironment,
getErrStream,
getFromEnvironment,
getHistoryNumber,
getOutputStream,
getParams,
getUserName,
inCommand,
parseLogin,
printHistory,
run,
stepDownHistory,
stepUpHistory,
su,
updatePrompt |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
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 |
Method Detail |
public void login() throws java.io.IOException
protected void sessionEnding()
protected void currentCommandFinished()
protected void exceptionThrown(java.lang.Exception ex)
ex
- The exception thrown.public java.lang.String getNextCommand() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |