|
||||||||||
| 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 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,
List<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 |
List<String> |
getAAAARecords(String strServer)
Retrieve a list of AAAA records |
List<String> |
getARecords(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 |
String |
toString()
|
protected String |
toString(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 String REGEX
| Constructor Detail |
|---|
public AMechanism()
| Method Detail |
|---|
public DNSLookupContinuation checkSPF(SPFSession spfData)
throws PermErrorException,
TempErrorException,
NeutralException,
NoneException
SPFChecker
checkSPF in interface SPFCheckerspfData - 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 ConfigurationEnabledconfig in class GenericMechanismparams - the ConfigurationMatch which should used
PermErrorException - get thrown if a PermError should returnedGenericMechanism.config(Configuration)
public boolean checkAddressList(IPAddr checkAddress,
List<String> addressList,
int cidr)
throws PermErrorException
checkAddress - The ip wich should be contained in the given ArrayListaddressList - The ip ArrayList.
PermErrorExceptionprotected int getIp4cidr()
protected int getIp6cidr()
public String toString()
toString in class ObjectObject.toString()protected String toString(String mechKey)
Object.toString()public List<String> getAAAARecords(String strServer)
public List<String> getARecords(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 SPFCheckerDNSResponseListenerresponse - 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 | |||||||||