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 String
ABNF: dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]protected static final String
ABNF: ip4-cidr-length = "/" 1*DIGITprotected static final String
ABNF: ip6-cidr-length = "/" 1*DIGITprotected MacroExpand
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
config
(Configuration params) Configurationvoid
enableMacroExpand
(MacroExpand macroExpand) Provide component with a DNSService.protected String
expandHost
(SPFSession spfData) Expand the hostnameprotected String
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:ConfigurationEnabled
Configuration- Specified by:
config
in 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:MacroExpandEnabled
Provide component with a DNSService.- Specified by:
enableMacroExpand
in interfaceMacroExpandEnabled
- Parameters:
macroExpand
- the macroExpand service. Must not benull
.- See Also:
-