de.malowa.rules.delay
Class DefaultDelayRule

java.lang.Object
  extended by de.malowa.rules.delay.DefaultDelayRule
All Implemented Interfaces:
DelayRule

public final class DefaultDelayRule
extends java.lang.Object
implements DelayRule

This concrete implementation of the interface DelayRule defines the standard delay times based on the whitepaper by Evan Harris

Author:
Marcel Lohmann
See Also:
"http://projects.puremagic.com/greylisting/whitepaper.html"

Constructor Summary
DefaultDelayRule()
           
 
Method Summary
 int getDelayTime(SMTPInformation info)
          Returns the delay in minutes for the given SMTP mail header.
 int getDelayTimeWithHistory(SMTPInformation info, MailHistory history)
          Returns the delay in minutes for the given SMTP mail header.
 void update()
          does nothing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDelayRule

public DefaultDelayRule()
Method Detail

getDelayTime

public int getDelayTime(SMTPInformation info)
Description copied from interface: DelayRule
Returns the delay in minutes for the given SMTP mail header. Will be used for calculation of initial delay while inserting into greylist database.

Specified by:
getDelayTime in interface DelayRule
Parameters:
info - is ignored
Returns:
60 (minutes)

getDelayTimeWithHistory

public int getDelayTimeWithHistory(SMTPInformation info,
                                   MailHistory history)
Description copied from interface: DelayRule
Returns the delay in minutes for the given SMTP mail header. Will be used for calculation of further delay when SMTP header is already known to the greylist database. May delegate to DelayRule.getDelayTime(SMTPInformation) without considering history.

Specified by:
getDelayTimeWithHistory in interface DelayRule
Parameters:
info - is ignored
history - is ignored
Returns:
60 (minutes)

update

public void update()
does nothing

Specified by:
update in interface DelayRule