|
|||||||||
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.Server | +--com.dalsemi.shell.server.ftp.FTPServer
A simple server that uses FTP as described in RFC 959. This server uses a ServerSocket to listen on the specified port (defaults to port 21) for FTP connection requests. For each connection made, an FTP session is created. All command processing is handled by the FTP session, not this server.
Fields inherited from class com.dalsemi.shell.server.Server |
sessions,
shutdown |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Constructor Summary | |
FTPServer()
Prepares the FTP server to listen on the well known FTP port (21). |
|
FTPServer(int port)
Prepares the FTP server to listen on an arbitrary port. |
Method Summary | |
protected Session |
acceptNewSession()
Listens on the connection port for connection requests. |
void |
broadcast(java.lang.String sendThis)
This method does not apply to an FTPServer, so it does nothing. |
protected void |
closeAllPorts()
Closes the ServerSocket used to listen for connections. |
static java.lang.String |
getConnectionMsgFile()
Gets the name of the file to be displayed when a user connects to this server. |
static java.lang.String |
getWelcomeMsgFile()
Gets the name of the file to be displayed when after a user logs in to this server. |
static boolean |
isAnonymousAllowed()
Indicates whether anonymous login is allowed to this FTP server. |
static boolean |
isRootAllowed()
Indicates whether root access is allowed to this FTP server. |
static java.lang.String |
logAnon()
Returns the name of the file where anonymous logins should be logged. |
Methods inherited from class com.dalsemi.shell.server.Server |
checkForNewSessions,
getConnectedUsers,
run,
sessionEnded,
shutDown |
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 |
Constructor Detail |
public FTPServer() throws java.io.IOException
run()
method is executed.public FTPServer(int port) throws java.io.IOException
run()
method is executed.Method Detail |
public static java.lang.String getConnectionMsgFile()
null
if no connection file was specifiedpublic static java.lang.String getWelcomeMsgFile()
null
if no welcome file was specifiedpublic static boolean isAnonymousAllowed()
true
and anonymous logins will be accepted.
This method will always return the value the variable had when the server
was constructed. Changing the value of environment variable after
creating the server will have no effect.true
if anonymous is allowed to loginpublic 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 environment variable after
creating the server will have no effect.true
if root is allowed to loginpublic static java.lang.String logAnon()
null
if none specifiedprotected Session acceptNewSession()
FTPSession
protected void closeAllPorts() throws java.io.IOException
public void broadcast(java.lang.String sendThis)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |