Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

jsd.ftp.server.ftp
Class FtpConfig  view FtpConfig download FtpConfig.java

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended byjsd.ftp.util.BaseProperties
                  extended byjsd.ftp.server.ftp.FtpConfig
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map, java.io.Serializable

public class FtpConfig
extends jsd.ftp.util.BaseProperties

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.


Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
private static java.lang.String IP_PROP
           
private static java.lang.String LOG_FILE
           
private  boolean mbAllowIp
           
private  boolean mbAnonAllowed
           
private  boolean mbLogFlush
           
private  java.io.File mCfgFile
           
private  ConnectionService mConService
           
private  java.io.File mDataDir
           
private  java.io.File mDefaultRoot
           
private  jsd.ftp.io.LogFile mFtpLog
           
private  int miAnonLogin
           
private  int miDefaultIdle
           
private  int miLogLevel
           
private  int miMaxLogin
           
private  int miMaxThread
           
private  int miPollInterval
           
private  jsd.ftp.server.IpRestrictor mIpRestrictor
           
private  int miServerPort
           
private  long mlLogMaxSize
           
private  jsd.ftp.util.AsyncMessageQueue mQueue
           
private  java.net.InetAddress mSelfAddress
           
private  java.net.InetAddress mServerAddress
           
private  FtpStatistics mStatistics
           
private  FtpStatus mStatus
           
private  jsd.ftp.server.ftp.usermanager.UserManager mUserManager
           
static java.lang.String PREFIX
          Config properties prefix.
 
Fields inherited from class java.util.Properties
defaults
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
FtpConfig(java.io.File cfgFile)
          Constructor - read the configuration file.
 
Method Summary
 void dispose()
          Close this config and all the related resources.
 java.io.File getConfigFile()
          Get config file.
 ConnectionService getConnectionService()
          Get connection service.
 java.io.File getDataDir()
          Get resource directory.
 int getDefaultIdleTime()
          Get default idle time in seconds.
 java.io.File getDefaultRoot()
          Get default root directory
 jsd.ftp.server.IpRestrictor getIpRestrictor()
          Get IP restrictor object.
 jsd.ftp.io.LogFile getLogger()
          Get ftp log to write log entries.
 int getMaxAnonymousLogins()
          Get maximum number of anonymous connections.
 int getMaxConnections()
          Get maximum number of connections.
 jsd.ftp.util.AsyncMessageQueue getMessageQueue()
          Get message queue
 int getSchedulerInterval()
          Get poll interval in seconds.
 java.net.InetAddress getSelfAddress()
          Get self address
 java.net.InetAddress getServerAddress()
          Get server bind address.
 int getServerPort()
          Get server port.
 FtpStatistics getStatistics()
          Get global statistics object.
 FtpStatus getStatus()
          Get ftp status resource.
 java.lang.String getSystemName()
          Get the system name.
 int getThreadCount()
          Get thread count
 jsd.ftp.server.ftp.usermanager.UserManager getUserManager()
          Get user manager.
 boolean isAllowIp()
          Allow Ip
 boolean isAnonymousLoginAllowed()
          Check annonymous login support.
 
Methods inherited from class jsd.ftp.util.BaseProperties
getBoolean, getBoolean, getClass, getClass, getDate, getDate, getDateFormat, getDateFormat, getDouble, getDouble, getFile, getFile, getInetAddress, getInetAddress, getInteger, getInteger, getLong, getLong, getTimeZone, getTimeZone, setInetAddress, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

PREFIX

public static final java.lang.String PREFIX
Config properties prefix.

See Also:
Constant Field Values

LOG_FILE

private static final java.lang.String LOG_FILE
See Also:
Constant Field Values

IP_PROP

private static final java.lang.String IP_PROP
See Also:
Constant Field Values

mCfgFile

private java.io.File mCfgFile

mFtpLog

private jsd.ftp.io.LogFile mFtpLog

mStatus

private FtpStatus mStatus

mConService

private ConnectionService mConService

mIpRestrictor

private jsd.ftp.server.IpRestrictor mIpRestrictor

mUserManager

private jsd.ftp.server.ftp.usermanager.UserManager mUserManager

mServerAddress

private java.net.InetAddress mServerAddress

mSelfAddress

private java.net.InetAddress mSelfAddress

mStatistics

private FtpStatistics mStatistics

miServerPort

private int miServerPort

miMaxThread

private int miMaxThread

miMaxLogin

private int miMaxLogin

miAnonLogin

private int miAnonLogin

miPollInterval

private int miPollInterval

miDefaultIdle

private int miDefaultIdle

miLogLevel

private int miLogLevel

mlLogMaxSize

private long mlLogMaxSize

mbLogFlush

private boolean mbLogFlush

mbAnonAllowed

private boolean mbAnonAllowed

mbAllowIp

private boolean mbAllowIp

mDataDir

private java.io.File mDataDir

mDefaultRoot

private java.io.File mDefaultRoot

mQueue

private jsd.ftp.util.AsyncMessageQueue mQueue
Constructor Detail

FtpConfig

public FtpConfig(java.io.File cfgFile)
          throws java.lang.Exception
Constructor - read the configuration file.

Method Detail

getConfigFile

public java.io.File getConfigFile()
Get config file.


getServerPort

public int getServerPort()
Get server port.


getServerAddress

public java.net.InetAddress getServerAddress()
Get server bind address.


getSelfAddress

public java.net.InetAddress getSelfAddress()
Get self address


getThreadCount

public int getThreadCount()
Get thread count


isAnonymousLoginAllowed

public boolean isAnonymousLoginAllowed()
Check annonymous login support.


getDataDir

public java.io.File getDataDir()
Get resource directory.


isAllowIp

public boolean isAllowIp()
Allow Ip


getStatus

public FtpStatus getStatus()
Get ftp status resource.


getConnectionService

public ConnectionService getConnectionService()
Get connection service.


getUserManager

public jsd.ftp.server.ftp.usermanager.UserManager 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 java.io.File getDefaultRoot()
Get default root directory


getLogger

public jsd.ftp.io.LogFile getLogger()
Get ftp log to write log entries.


getIpRestrictor

public jsd.ftp.server.IpRestrictor getIpRestrictor()
Get IP restrictor object.


getStatistics

public FtpStatistics getStatistics()
Get global statistics object.


getMessageQueue

public jsd.ftp.util.AsyncMessageQueue getMessageQueue()
Get message queue


getSystemName

public java.lang.String getSystemName()
Get the system name.


dispose

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