org.apache.james.jspf.terms
Class IP4Mechanism
java.lang.Object
org.apache.james.jspf.terms.GenericMechanism
org.apache.james.jspf.terms.IP4Mechanism
- All Implemented Interfaces:
- LogEnabled, MacroExpandEnabled, SPFChecker, ConfigurationEnabled, Mechanism
- Direct Known Subclasses:
- IP6Mechanism
public class IP4Mechanism
- extends GenericMechanism
This class represent the ip4 mechanism
Field Summary |
static java.lang.String |
REGEX
ABNF: IP4 = "ip4" ":" ip4-network [ ip4-cidr-length ] |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
REGEX
public static final java.lang.String REGEX
- ABNF: IP4 = "ip4" ":" ip4-network [ ip4-cidr-length ]
- See Also:
- Constant Field Values
IP4Mechanism
public IP4Mechanism()
checkSPF
public DNSLookupContinuation checkSPF(SPFSession spfData)
throws PermErrorException
- Description copied from interface:
SPFChecker
- Run check for SPF with the given values.
- Parameters:
spfData
- The SPF1Data which should be used to run the check
- Throws:
PermErrorException
- Get thrown if an error was detected- See Also:
SPFChecker.checkSPF(org.apache.james.jspf.core.SPFSession)
config
public void config(Configuration params)
throws PermErrorException
- Description copied from interface:
ConfigurationEnabled
- Configuration
- Specified by:
config
in interface ConfigurationEnabled
- Overrides:
config
in class GenericMechanism
- Parameters:
params
- the ConfigurationMatch which should used
- Throws:
PermErrorException
- get thrown if a PermError should returned- See Also:
GenericMechanism.config(org.apache.james.jspf.terms.Configuration)
isValidAddress
protected boolean isValidAddress(java.lang.String ipString)
- See Also:
Inet6Util.isValidIPV4Address(String)
getMaxCidr
protected int getMaxCidr()
- Returns the max cidr for ip4
- Returns:
- maxCidr The max cidr
getIp
protected IPAddr getIp()
- Returns:
- Returns the ip.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
Copyright © 2006-2009 The Apache Software Foundation. All Rights Reserved.