|
|||||||||
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.telnet.TelnetSession
This class encapsulates all functionality for a Telnet session. The Telnet server listens to port 23 for connection requests. When someone attempts to start a Telnet session, they contact port 23. 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 Telnet server and sessions are designed to be multi-threaded, allowing multiple simultaneous Telnet connections.
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 the underlying session's input stream. |
void |
login()
Logs the user into the system. |
protected void |
sessionEnding()
Called to clean up when the session is ending. |
void |
updatePrompt(java.lang.String withThis)
This method was added to speed up prompt printing. |
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 |
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()
public void updatePrompt(java.lang.String withThis)
withThis
- the current directoryprotected void exceptionThrown(java.lang.Exception ex)
ex
- the exception thrownpublic java.lang.String getNextCommand() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |