Package org.apache.james.jspf.terms
Class PTRMechanism
java.lang.Object
org.apache.james.jspf.terms.GenericMechanism
org.apache.james.jspf.terms.PTRMechanism
- All Implemented Interfaces:
DNSServiceEnabled,MacroExpandEnabled,SPFChecker,SPFCheckerDNSResponseListener,ConfigurationEnabled,Mechanism
public class PTRMechanism
extends GenericMechanism
implements DNSServiceEnabled, SPFCheckerDNSResponseListener
This class represent the ptr mechanism
-
Field Summary
FieldsFields inherited from class org.apache.james.jspf.terms.GenericMechanism
DUAL_CIDR_LENGTH_REGEX, IP4_CIDR_LENGTH_REGEX, IP6_CIDR_LENGTH_REGEX, macroExpand -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncheckSPF(SPFSession spfData) Run check for SPF with the given values.voidenableDNSService(DNSService service) Provide component with a DNSService.onDNSResponse(DNSResponse response, SPFSession spfSession) Continue the check for SPF with the given values and the given DNSResponseMethods inherited from class org.apache.james.jspf.terms.GenericMechanism
config, enableMacroExpand, expandHost, getDomain
-
Field Details
-
REGEX
ABNF: PTR = "ptr" [ ":" domain-spec ]- See Also:
-
-
Constructor Details
-
PTRMechanism
public PTRMechanism()
-
-
Method Details
-
checkSPF
public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException, TempErrorException, NeutralException, NoneException Description copied from interface:SPFCheckerRun check for SPF with the given values.- Specified by:
checkSPFin interfaceSPFChecker- Parameters:
spfData- The SPF1Data which should be used to run the check- Throws:
PermErrorException- Get thrown if an error was detectedTempErrorException- Get thrown if a DNS problem was detectedNeutralException- Get thrown if the result should be neutralNoneException- Get thrown if no Record was foundNoneException- See Also:
-
enableDNSService
Description copied from interface:DNSServiceEnabledProvide component with a DNSService.- Specified by:
enableDNSServicein interfaceDNSServiceEnabled- Parameters:
service- the dns service. Must not benull.- See Also:
-
onDNSResponse
public DNSLookupContinuation onDNSResponse(DNSResponse response, SPFSession spfSession) throws PermErrorException, TempErrorException, NoneException, NeutralException Description copied from interface:SPFCheckerDNSResponseListenerContinue the check for SPF with the given values and the given DNSResponse- Specified by:
onDNSResponsein interfaceSPFCheckerDNSResponseListener- Parameters:
response- The DNSResponse which should be used to run the checkspfSession- The SPFSession which should be used to run the check- Throws:
PermErrorException- Get thrown if an error was detectedTempErrorException- Get thrown if a DNS problem was detectedNoneException- Get thrown if no Record was foundNeutralException- Get thrown if the result should be neutral- See Also:
-