org.apache.ftpserver
Class FtpConfig

java.lang.Object
  extended by org.apache.ftpserver.FtpConfig

public class FtpConfig
extends Object

Ftp configuration class. It has all ftp server configuration parameters. This is not hot-editable. parameters will be loaded once during server startup. We can add our own config parameters.

Author:
Rana Bhattacharyya

Constructor Summary
FtpConfig()
          Default constructor - first step.
 
Method Summary
 void dispose()
          Close this config and all the related resources.
 org.apache.avalon.framework.configuration.Configuration getConfiguration()
          Get configuration
 ConnectionService getConnectionService()
          Get connection service.
 org.apache.avalon.framework.context.Context getContext()
          Get context
 int getDataPort()
          Get data port.
 int getDefaultIdleTime()
          Get default idle time in seconds.
 File getDefaultRoot()
          Get default root directory
 IpRestrictorInterface getIpRestrictor()
          Get IP restrictor object.
 org.apache.avalon.framework.logger.Logger getLogger()
          Get logger
 int getMaxAnonymousLogins()
          Get maximum number of anonymous connections.
 int getMaxConnections()
          Get maximum number of connections.
 AsyncMessageQueue getMessageQueue()
          Get message queue
 int getRemoteAdminPort()
          Get rmi port
 int getSchedulerInterval()
          Get poll interval in seconds.
 InetAddress getSelfAddress()
          Get self address
 InetAddress getServerAddress()
          Get server bind address.
 int getServerPort()
          Get server port.
 FtpStatistics getStatistics()
          Get global statistics object.
 FtpStatus getStatus()
          Get ftp status resource.
 String getSystemName()
          Get the system name.
 UserManagerInterface getUserManager()
          Get user manager.
 boolean isAnonymousLoginAllowed()
          Check annonymous login support.
 boolean isCreateHome()
          Create user home directory if not exist during login
 boolean isRemoteAdminAllowed()
          Is remote admin allowed
 void releaseDataPort(int port)
          Release data port
 void setConfiguration(org.apache.avalon.framework.configuration.Configuration conf)
          Set configuration - fifth step.
 void setContext(org.apache.avalon.framework.context.Context ctx)
          Set context - third step.
 void setLogger(org.apache.avalon.framework.logger.Logger logger)
          Set logger - second step.
 void setServiceManager(org.apache.avalon.framework.service.ServiceManager serviceManager)
          Set component manager - fourth step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FtpConfig

public FtpConfig()
          throws IOException
Default constructor - first step.

Throws:
IOException
Method Detail

setLogger

public void setLogger(org.apache.avalon.framework.logger.Logger logger)
Set logger - second step.


setContext

public void setContext(org.apache.avalon.framework.context.Context ctx)
Set context - third step.


setServiceManager

public void setServiceManager(org.apache.avalon.framework.service.ServiceManager serviceManager)
                       throws org.apache.avalon.framework.service.ServiceException
Set component manager - fourth step. TODO - case for more blocks here? - PJH

Throws:
org.apache.avalon.framework.service.ServiceException

setConfiguration

public void setConfiguration(org.apache.avalon.framework.configuration.Configuration conf)
                      throws Exception
Set configuration - fifth step.

Throws:
Exception

getDataPort

public int getDataPort()
Get data port. Data port number zero (0) means that any available port will be used.


releaseDataPort

public void releaseDataPort(int port)
Release data port


getLogger

public org.apache.avalon.framework.logger.Logger getLogger()
Get logger


getServerPort

public int getServerPort()
Get server port.


getContext

public org.apache.avalon.framework.context.Context getContext()
Get context


getConfiguration

public org.apache.avalon.framework.configuration.Configuration getConfiguration()
Get configuration


getServerAddress

public InetAddress getServerAddress()
Get server bind address.


getSelfAddress

public InetAddress getSelfAddress()
Get self address


isAnonymousLoginAllowed

public boolean isAnonymousLoginAllowed()
Check annonymous login support.


getStatus

public FtpStatus getStatus()
Get ftp status resource.


getConnectionService

public ConnectionService getConnectionService()
Get connection service.


getUserManager

public UserManagerInterface getUserManager()
Get user manager.


getMaxConnections

public int getMaxConnections()
Get maximum number of connections.


getMaxAnonymousLogins

public int getMaxAnonymousLogins()
Get maximum number of anonymous connections.


getSchedulerInterval

public int getSchedulerInterval()
Get poll interval in seconds.


getDefaultIdleTime

public int getDefaultIdleTime()
Get default idle time in seconds.


getDefaultRoot

public File getDefaultRoot()
Get default root directory


isCreateHome

public boolean isCreateHome()
Create user home directory if not exist during login


getRemoteAdminPort

public int getRemoteAdminPort()
Get rmi port


isRemoteAdminAllowed

public boolean isRemoteAdminAllowed()
Is remote admin allowed


getIpRestrictor

public IpRestrictorInterface getIpRestrictor()
Get IP restrictor object.


getStatistics

public FtpStatistics getStatistics()
Get global statistics object.


getMessageQueue

public AsyncMessageQueue getMessageQueue()
Get message queue


getSystemName

public String getSystemName()
Get the system name.


dispose

public void dispose()
Close this config and all the related resources. Ftp server FtpServer.stop() method will call this method.



Copyright © 2001-2012 Codehaus. All Rights Reserved.