Package org.apache.james.jspf.terms
Class GenericMechanism
java.lang.Object
org.apache.james.jspf.terms.GenericMechanism
- All Implemented Interfaces:
MacroExpandEnabled,SPFChecker,ConfigurationEnabled,Mechanism
- Direct Known Subclasses:
AMechanism,ExistsMechanism,IP4Mechanism,PTRMechanism
public abstract class GenericMechanism
extends Object
implements Mechanism, ConfigurationEnabled, MacroExpandEnabled
This abstract class represent a gerneric mechanism
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringABNF: dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]protected static final StringABNF: ip4-cidr-length = "/" 1*DIGITprotected static final StringABNF: ip6-cidr-length = "/" 1*DIGITprotected MacroExpand -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfig(Configuration params) ConfigurationvoidenableMacroExpand(MacroExpand macroExpand) Provide component with a DNSService.protected StringexpandHost(SPFSession spfData) Expand the hostnameprotected StringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.james.jspf.core.SPFChecker
checkSPF
-
Field Details
-
IP4_CIDR_LENGTH_REGEX
ABNF: ip4-cidr-length = "/" 1*DIGIT- See Also:
-
IP6_CIDR_LENGTH_REGEX
ABNF: ip6-cidr-length = "/" 1*DIGIT- See Also:
-
DUAL_CIDR_LENGTH_REGEX
ABNF: dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]- See Also:
-
macroExpand
-
-
Constructor Details
-
GenericMechanism
public GenericMechanism()
-
-
Method Details
-
expandHost
Expand the hostname- Parameters:
spfData- The SPF1Data to use- Throws:
PermErrorException- get Thrown if invalid macros are used
-
config
Description copied from interface:ConfigurationEnabledConfiguration- Specified by:
configin interfaceConfigurationEnabled- Parameters:
params- the ConfigurationMatch which should used- Throws:
PermErrorException- get thrown if a PermError should returned- See Also:
-
getDomain
- Returns:
- Returns the domain.
-
enableMacroExpand
Description copied from interface:MacroExpandEnabledProvide component with a DNSService.- Specified by:
enableMacroExpandin interfaceMacroExpandEnabled- Parameters:
macroExpand- the macroExpand service. Must not benull.- See Also:
-