org.apache.james.jspf.terms
Class ExpModifier

java.lang.Object
  extended by org.apache.james.jspf.terms.GenericModifier
      extended by org.apache.james.jspf.terms.ExpModifier
All Implemented Interfaces:
LogEnabled, MacroExpandEnabled, SPFChecker, SPFCheckerDNSResponseListener, ConfigurationEnabled, Modifier

public class ExpModifier
extends GenericModifier
implements MacroExpandEnabled, SPFCheckerDNSResponseListener

This class represent the exp modifier


Field Summary
static java.lang.String REGEX
          ABNF: explanation = "exp" "=" domain-spec NOTE: the last +"?"
 
Fields inherited from class org.apache.james.jspf.terms.GenericModifier
log
 
Constructor Summary
ExpModifier()
           
 
Method Summary
protected  DNSLookupContinuation checkSPFLogged(SPFSession spfData)
          Generate the explanation and set it in SPF1Data so it can be accessed easy later if needed
 void enableMacroExpand(MacroExpand macroExpand)
          Provide component with a DNSService.
 DNSLookupContinuation onDNSResponse(DNSResponse lookup, SPFSession spfData)
          Continue the check for SPF with the given values and the given DNSResponse
 java.lang.String toString()
           
 
Methods inherited from class org.apache.james.jspf.terms.GenericModifier
checkSPF, config, enableLogging, enforceSingleInstance, getHost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REGEX

public static final java.lang.String REGEX
ABNF: explanation = "exp" "=" domain-spec NOTE: the last +"?" has been added to support RFC4408 ERRATA for the EXP modifier. An "exp=" should not result in a perm error but should be ignored. Errata: http://www.openspf.org/RFC_4408/Errata#empty-exp NOTE: the last +"?" has been then removed because OpenSPF released a new testsuite requiring a PermError on "exp=" (see JSPF-56).

See Also:
Constant Field Values
Constructor Detail

ExpModifier

public ExpModifier()
Method Detail

checkSPFLogged

protected DNSLookupContinuation checkSPFLogged(SPFSession spfData)
                                        throws PermErrorException,
                                               TempErrorException,
                                               NeutralException,
                                               NoneException
Generate the explanation and set it in SPF1Data so it can be accessed easy later if needed

Specified by:
checkSPFLogged in class GenericModifier
Parameters:
spfData - The SPF1Data which should used
Throws:
PermErrorException
TempErrorException
NoneException
NeutralException

onDNSResponse

public DNSLookupContinuation onDNSResponse(DNSResponse lookup,
                                           SPFSession spfData)
                                    throws PermErrorException,
                                           TempErrorException,
                                           NeutralException,
                                           NoneException
Description copied from interface: SPFCheckerDNSResponseListener
Continue the check for SPF with the given values and the given DNSResponse

Specified by:
onDNSResponse in interface SPFCheckerDNSResponseListener
Parameters:
lookup - The DNSResponse which should be used to run the check
spfData - The SPFSession which should be used to run the check
Throws:
PermErrorException - Get thrown if an error was detected
TempErrorException - Get thrown if a DNS problem was detected
NeutralException - Get thrown if the result should be neutral
NoneException - Get thrown if no Record was found
See Also:
SPFCheckerDNSResponseListener.onDNSResponse(org.apache.james.jspf.core.DNSResponse, org.apache.james.jspf.core.SPFSession)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

enableMacroExpand

public void enableMacroExpand(MacroExpand macroExpand)
Description copied from interface: MacroExpandEnabled
Provide component with a DNSService.

Specified by:
enableMacroExpand in interface MacroExpandEnabled
Parameters:
macroExpand - the macroExpand service. Must not be null.
See Also:
MacroExpandEnabled.enableMacroExpand(org.apache.james.jspf.core.MacroExpand)


Copyright © 2006-2009 The Apache Software Foundation. All Rights Reserved.