rheise.jftpd
Class Server

java.lang.Object
  |
  +--rheise.jftpd.Server

public class Server
extends java.lang.Object

This is the main class for jftpd. It creates the server socket and loops forever accepting user connections and creating ServerPI threads to handle them.

To run under unix, type:

java rheise.jftpd.Server


Field Summary
private  int port
          The port this server is listening on.
static int SERVER_DATA_PORT
          The default data port.
static int SERVER_PORT
          The port this server connects to.
static java.lang.String VERSION
          The version number of jftpd.
 
Constructor Summary
Server(java.util.Properties properties)
          Create an FTP server to run on port 21.
Server(java.util.Properties properties, int port)
          Create an FTP server to run on the specified port.
 
Method Summary
private  void configure(java.util.Properties properties)
          Configures the ftp server from the configuration properties.
static void main(java.lang.String[] args)
           
 void service(java.net.Socket socket)
          Handle a client connection.
private  void start()
          Starts the FTP server.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
The version number of jftpd.

SERVER_PORT

public static final int SERVER_PORT
The port this server connects to.

SERVER_DATA_PORT

public static final int SERVER_DATA_PORT
The default data port.

port

private int port
The port this server is listening on.
Constructor Detail

Server

public Server(java.util.Properties properties)
       throws ParseException
Create an FTP server to run on port 21.

Server

public Server(java.util.Properties properties,
              int port)
       throws ParseException
Create an FTP server to run on the specified port.
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception

start

private void start()
            throws java.lang.Exception
Starts the FTP server. This method listens for connections on the FTP server port (usually port 21), and spawns a new thread to handle each connection.

service

public void service(java.net.Socket socket)
             throws java.lang.Exception
Handle a client connection. This may be called directly by a superserver instead of start().
Parameters:
socket - the client socket.

configure

private void configure(java.util.Properties properties)
                throws ParseException
Configures the ftp server from the configuration properties.