org.apache.james.smtpserver.core.filter.fastfail
Class TarpitHandler

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.smtpserver.core.filter.fastfail.TarpitHandler
All Implemented Interfaces:
org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, CommandHandler

public class TarpitHandler
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements CommandHandler, org.apache.avalon.framework.configuration.Configurable


Constructor Summary
TarpitHandler()
           
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration handlerConfiguration)
           
 java.util.Collection getImplCommands()
          Return a Collection of implemented commands
 void onCommand(SMTPSession session)
          Handle the command
 void setTarpitRcptCount(int tarpitRcptCount)
          Set the tarpit count after which the tarpit sleep time will be activated
 void setTarpitSleepTime(long tarpitSleepTime)
          Set the tarpit sleep time
 
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
 

Constructor Detail

TarpitHandler

public TarpitHandler()
Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration handlerConfiguration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException
See Also:
Configurable.configure(Configuration)

setTarpitRcptCount

public void setTarpitRcptCount(int tarpitRcptCount)
Set the tarpit count after which the tarpit sleep time will be activated

Parameters:
tarpitRcptCount -

setTarpitSleepTime

public void setTarpitSleepTime(long tarpitSleepTime)
Set the tarpit sleep time

Parameters:
tarpitSleepTime - Time in milliseconds

onCommand

public void onCommand(SMTPSession session)
Description copied from interface: CommandHandler
Handle the command

Specified by:
onCommand in interface CommandHandler
See Also:
CommandHandler.onCommand(SMTPSession)

getImplCommands

public java.util.Collection getImplCommands()
Description copied from interface: CommandHandler
Return a Collection of implemented commands

Specified by:
getImplCommands in interface CommandHandler
Returns:
Collection which contains implemented commands
See Also:
CommandHandler.getImplCommands()


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.