org.apache.ftpserver.ip
Class AbstractIpRestrictor

java.lang.Object
  extended byorg.apache.avalon.framework.logger.AbstractLogEnabled
      extended byorg.apache.ftpserver.ip.AbstractIpRestrictor
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.activity.Initializable, IpRestrictorInterface, org.apache.avalon.framework.logger.LogEnabled
Direct Known Subclasses:
FileIpRestrictor

public abstract class AbstractIpRestrictor
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements IpRestrictorInterface, org.apache.avalon.framework.context.Contextualizable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.activity.Disposable

Abstract ip restrictor class.

Author:
Rana Bhattacharyya

Field Summary
protected  boolean mbAllowIp
           
protected  org.apache.avalon.framework.configuration.Configuration mConfig
           
 
Fields inherited from interface org.apache.ftpserver.ip.IpRestrictorInterface
ROLE
 
Constructor Summary
AbstractIpRestrictor()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
          Configure user manager - third step.
 void contextualize(org.apache.avalon.framework.context.Context context)
          Set context object - first step.
 void dispose()
          Close user manager - dummy implementation.
 java.lang.String getBaseDirectory()
           
 org.apache.avalon.framework.configuration.Configuration getConfig()
          Get config object.
 void initialize()
          Initialize - fourth step.
 boolean isAllowIp()
          Get allow/ban IP flag.
 void reload()
          Reload banned ip list - dummy implementation
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.ftpserver.ip.IpRestrictorInterface
addEntry, clear, getAllEntries, hasPermission, removeEntry, save
 

Field Detail

mConfig

protected org.apache.avalon.framework.configuration.Configuration mConfig

mbAllowIp

protected boolean mbAllowIp
Constructor Detail

AbstractIpRestrictor

public AbstractIpRestrictor()
Method Detail

contextualize

public void contextualize(org.apache.avalon.framework.context.Context context)
                   throws org.apache.avalon.framework.context.ContextException
Set context object - first step.

Specified by:
contextualize in interface org.apache.avalon.framework.context.Contextualizable
Throws:
org.apache.avalon.framework.context.ContextException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configure user manager - third step.

Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

isAllowIp

public boolean isAllowIp()
Get allow/ban IP flag.

Specified by:
isAllowIp in interface IpRestrictorInterface

getConfig

public org.apache.avalon.framework.configuration.Configuration getConfig()
Get config object.


getBaseDirectory

public java.lang.String getBaseDirectory()

initialize

public void initialize()
                throws java.lang.Exception
Initialize - fourth step.

Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception

reload

public void reload()
            throws java.io.IOException
Reload banned ip list - dummy implementation

Specified by:
reload in interface IpRestrictorInterface
Throws:
java.io.IOException

dispose

public void dispose()
Close user manager - dummy implementation.

Specified by:
dispose in interface org.apache.avalon.framework.activity.Disposable


Copyright © -2005 . All Rights Reserved.