|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
jhomenet.shell.server.Server
jhomenet.shell.server.telnet.TelnetServer
public class TelnetServer
A simple server that uses the Telnet protocol as described in RFC 854. This server uses a ServerSocket to listen on the specified port (defaults to port 23) for Telnet connection requests. For each connection made, a Telnet session is created. All command processing is handled by the Telnet session, not this server.
| 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 jhomenet.shell.server.Server |
|---|
pauseServer, sessions, shutdown |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TelnetServer(SystemInterface systemInterface)
Prepares the Telnet server to listen on the well known Telnet port (23). |
|
TelnetServer(SystemInterface systemInterface,
int port)
Prepares the Telnet server to listen on an arbitrary port. |
|
| Method Summary | |
|---|---|
protected Session |
acceptNewSession()
Waits for a connection request. |
protected void |
closeAllPorts()
Closes the ServerSocket used to listen for connections. |
static java.lang.String |
getWelcomeFile()
Gets the location of the file to be displayed when after a user logs in to this server. |
static boolean |
isRootAllowed()
Indicates whether root access is allowed to this Telnet server. |
| Methods inherited from class jhomenet.shell.server.Server |
|---|
broadcast, checkForNewSessions, getConnectedUsers, getSystemInterface, pauseServer, resumeServer, run, sessionEnded, shutDown |
| 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 TelnetServer(SystemInterface systemInterface)
throws java.io.IOException
run() method is executed.
java.io.IOException
public TelnetServer(SystemInterface systemInterface,
int port)
throws java.io.IOException
run() method is executed.
java.io.IOException| Method Detail |
|---|
public static java.lang.String getWelcomeFile()
null
if no welcome file was specifiedpublic static boolean isRootAllowed()
true and root logins will be accepted.
This method will always return the value the variable had when the server
was constructed. Changing the value of properties variable after
creating the server will have no effect.
true if root is allowed to loginprotected Session acceptNewSession()
Server
acceptNewSession in class Server
protected void closeAllPorts()
throws java.io.IOException
closeAllPorts in class Serverjava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||