|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.james.jspf.terms.GenericMechanism
org.apache.james.jspf.terms.AMechanism
public class AMechanism
This class represent the a mechanism
Field Summary | |
---|---|
static java.lang.String |
REGEX
ABNF: A = "a" [ ":" domain-spec ] [ dual-cidr-length ] |
Fields inherited from class org.apache.james.jspf.terms.GenericMechanism |
---|
DUAL_CIDR_LENGTH_REGEX, IP4_CIDR_LENGTH_REGEX, IP6_CIDR_LENGTH_REGEX, log, macroExpand |
Constructor Summary | |
---|---|
AMechanism()
|
Method Summary | |
---|---|
boolean |
checkAddressList(IPAddr checkAddress,
java.util.List<java.lang.String> addressList,
int cidr)
Check if the given ipaddress array contains the provided ip. |
DNSLookupContinuation |
checkSPF(SPFSession spfData)
Run check for SPF with the given values. |
void |
config(Configuration params)
Configuration |
java.util.List<java.lang.String> |
getAAAARecords(java.lang.String strServer)
Retrieve a list of AAAA records |
java.util.List<java.lang.String> |
getARecords(java.lang.String strServer)
Get a list of IPAddr's for a server |
protected int |
getIp4cidr()
|
protected int |
getIp6cidr()
|
DNSLookupContinuation |
onDNSResponse(DNSResponse response,
SPFSession spfSession)
Continue the check for SPF with the given values and the given DNSResponse |
java.lang.String |
toString()
|
protected java.lang.String |
toString(java.lang.String mechKey)
|
Methods inherited from class org.apache.james.jspf.terms.GenericMechanism |
---|
enableLogging, enableMacroExpand, expandHost, getDomain |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String REGEX
Constructor Detail |
---|
public AMechanism()
Method Detail |
---|
public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException, TempErrorException, NeutralException, NoneException
SPFChecker
checkSPF
in interface SPFChecker
spfData
- The SPF1Data which should be used to run the check
PermErrorException
- Get thrown if an error was detected
TempErrorException
- Get thrown if a DNS problem was detected
NeutralException
- Get thrown if the result should be neutral
NoneException
- Get thrown if no Record was foundSPFChecker.checkSPF(org.apache.james.jspf.core.SPFSession)
public void config(Configuration params) throws PermErrorException
ConfigurationEnabled
config
in interface ConfigurationEnabled
config
in class GenericMechanism
params
- the ConfigurationMatch which should used
PermErrorException
- get thrown if a PermError should returnedGenericMechanism.config(Configuration)
public boolean checkAddressList(IPAddr checkAddress, java.util.List<java.lang.String> addressList, int cidr) throws PermErrorException
checkAddress
- The ip wich should be contained in the given ArrayListaddressList
- The ip ArrayList.
PermErrorException
protected int getIp4cidr()
protected int getIp6cidr()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
protected java.lang.String toString(java.lang.String mechKey)
Object.toString()
public java.util.List<java.lang.String> getAAAARecords(java.lang.String strServer)
public java.util.List<java.lang.String> getARecords(java.lang.String strServer)
strServer
- The hostname or ipAddress whe should get the A-Records for
public DNSLookupContinuation onDNSResponse(DNSResponse response, SPFSession spfSession) throws PermErrorException, TempErrorException, NoneException, NeutralException
SPFCheckerDNSResponseListener
onDNSResponse
in interface SPFCheckerDNSResponseListener
response
- The DNSResponse which should be used to run the checkspfSession
- The SPFSession which should be used to run the check
PermErrorException
- Get thrown if an error was detected
TempErrorException
- Get thrown if a DNS problem was detected
NoneException
- Get thrown if no Record was found
NeutralException
- Get thrown if the result should be neutralSPFCheckerDNSResponseListener.onDNSResponse(org.apache.james.jspf.core.DNSResponse, org.apache.james.jspf.core.SPFSession)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |