public abstract class GenericMechanism extends Object implements Mechanism, ConfigurationEnabled, LogEnabled, MacroExpandEnabled
Modifier and Type | Field and Description |
---|---|
protected static String |
DUAL_CIDR_LENGTH_REGEX
ABNF: dual-cidr-length = [ ip4-cidr-length ] [ "/" ip6-cidr-length ]
|
protected static String |
IP4_CIDR_LENGTH_REGEX
ABNF: ip4-cidr-length = "/" 1*DIGIT
|
protected static String |
IP6_CIDR_LENGTH_REGEX
ABNF: ip6-cidr-length = "/" 1*DIGIT
|
protected Logger |
log |
protected MacroExpand |
macroExpand |
Constructor and Description |
---|
GenericMechanism() |
Modifier and Type | Method and Description |
---|---|
void |
config(Configuration params)
Configuration
|
void |
enableLogging(Logger logger)
Provide component with a logger.
|
void |
enableMacroExpand(MacroExpand macroExpand)
Provide component with a DNSService.
|
protected String |
expandHost(SPFSession spfData)
Expand the hostname
|
protected String |
getDomain() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkSPF
protected static final String IP4_CIDR_LENGTH_REGEX
protected static final String IP6_CIDR_LENGTH_REGEX
protected static final String DUAL_CIDR_LENGTH_REGEX
protected Logger log
protected MacroExpand macroExpand
protected String expandHost(SPFSession spfData) throws PermErrorException
spfData
- The SPF1Data to usePermErrorException
- get Thrown if invalid macros are usedpublic void config(Configuration params) throws PermErrorException
ConfigurationEnabled
config
in interface ConfigurationEnabled
params
- the ConfigurationMatch which should usedPermErrorException
- get thrown if a PermError should returnedConfigurationEnabled.config(Configuration)
protected String getDomain()
public void enableLogging(Logger logger)
LogEnabled
enableLogging
in interface LogEnabled
logger
- the logger. Must not be null
.LogEnabled.enableLogging(org.apache.james.jspf.core.Logger)
public void enableMacroExpand(MacroExpand macroExpand)
MacroExpandEnabled
enableMacroExpand
in interface MacroExpandEnabled
macroExpand
- the macroExpand service. Must not be null
.MacroExpandEnabled.enableMacroExpand(org.apache.james.jspf.core.MacroExpand)
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.