org.apache.james.jspf.terms
Class MXMechanism

java.lang.Object
  extended by org.apache.james.jspf.terms.GenericMechanism
      extended by org.apache.james.jspf.terms.AMechanism
          extended by org.apache.james.jspf.terms.MXMechanism
All Implemented Interfaces:
LogEnabled, MacroExpandEnabled, SPFChecker, SPFCheckerDNSResponseListener, ConfigurationEnabled, Mechanism

public class MXMechanism
extends AMechanism
implements SPFCheckerDNSResponseListener

This class represent the mx mechanism


Field Summary
static java.lang.String REGEX
          ABNF: MX = "mx" [ ":" domain-spec ] [ dual-cidr-length ]
 
Fields inherited from class org.apache.james.jspf.terms.GenericMechanism
DUAL_CIDR_LENGTH_REGEX, IP4_CIDR_LENGTH_REGEX, IP6_CIDR_LENGTH_REGEX, log, macroExpand
 
Constructor Summary
MXMechanism()
           
 
Method Summary
 DNSLookupContinuation checkSPF(SPFSession spfData)
          Run check for SPF with the given values.
 DNSLookupContinuation onDNSResponse(DNSResponse response, SPFSession spfSession)
          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.AMechanism
checkAddressList, config, getAAAARecords, getARecords, getIp4cidr, getIp6cidr, toString
 
Methods inherited from class org.apache.james.jspf.terms.GenericMechanism
enableLogging, enableMacroExpand, expandHost, getDomain
 
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: MX = "mx" [ ":" domain-spec ] [ dual-cidr-length ]

See Also:
Constant Field Values
Constructor Detail

MXMechanism

public MXMechanism()
Method Detail

checkSPF

public DNSLookupContinuation checkSPF(SPFSession spfData)
                               throws PermErrorException,
                                      TempErrorException,
                                      NeutralException,
                                      NoneException
Description copied from interface: SPFChecker
Run check for SPF with the given values.

Specified by:
checkSPF in interface SPFChecker
Overrides:
checkSPF in class AMechanism
Parameters:
spfData - The SPF1Data 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:
AMechanism.checkSPF(org.apache.james.jspf.core.SPFSession)

onDNSResponse

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

Specified by:
onDNSResponse in interface SPFCheckerDNSResponseListener
Overrides:
onDNSResponse in class AMechanism
Parameters:
response - The DNSResponse which should be used to run the check
spfSession - 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
NoneException - Get thrown if no Record was found
NeutralException - Get thrown if the result should be neutral
See Also:
AMechanism.onDNSResponse(org.apache.james.jspf.core.DNSResponse, org.apache.james.jspf.core.SPFSession)

toString

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


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