Package org.apache.james.jspf.core

Examples of org.apache.james.jspf.core.SPFChecker


    public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
            NoneException, TempErrorException, NeutralException {

        // if we already have a result we don't need to add further processing.
        if (spfData.getCurrentResultExpanded() == null && spfData.getCurrentResult() == null) {
            SPFChecker policyChecker = new PolicyChecker(getPolicies());
            SPFChecker recordChecker = new SPFRecordChecker();
           
            spfData.pushChecker(recordChecker);
            spfData.pushChecker(policyChecker);
        }
       
View Full Code Here


           
            LinkedList<SPFChecker> policyCheckers = new LinkedList<SPFChecker>();
           
            Iterator<SPFChecker> i = spfRecord.iterator();
            while (i.hasNext()) {
                SPFChecker checker = i.next();
                policyCheckers.add(checker);
            }

            while (policyCheckers.size() > 0) {
                SPFChecker removeLast = policyCheckers.removeLast();
                spfData.pushChecker(removeLast);
            }

            return null;
        }
View Full Code Here

        public DNSLookupContinuation checkSPF(SPFSession spfData)
                throws PermErrorException, TempErrorException,
                NeutralException, NoneException {
           
            while (policies.size() > 0) {
                SPFChecker removeLast = policies.removeLast();
                spfData.pushChecker(removeLast);
            }
           
            return null;
        }
View Full Code Here

    /**
     * @see org.apache.james.jspf.executor.SPFExecutor#execute(org.apache.james.jspf.core.SPFSession, org.apache.james.jspf.executor.FutureSPFResult)
     */
    public void execute(SPFSession session, FutureSPFResult result) {
        SPFChecker checker;
        while ((checker = session.popChecker()) != null) {
            // only execute checkers we added (better recursivity)
            log.debug("Executing checker: " + checker);
            try {
                DNSLookupContinuation cont = checker.checkSPF(session);
                // if the checker returns a continuation we return it
                while (cont != null) {
                    DNSResponse response;
                    try {
                        response = new DNSResponse(dnsProbe.getRecords(cont
View Full Code Here

    public void execute(SPFSession session, FutureSPFResult result) {
        execute(session, result, true);
    }
       
    public void execute(SPFSession session, FutureSPFResult result, boolean throttle) {
        SPFChecker checker;
        while ((checker = session.popChecker()) != null) {
            // only execute checkers we added (better recursivity)
            log.debug("Executing checker: " + checker);
            try {
                DNSLookupContinuation cont = checker.checkSPF(session);
                // if the checker returns a continuation we return it
                if (cont != null) {
                    invokeAsynchService(session, result, cont, throttle);
                    return;
                }
View Full Code Here

                } else {
                    execute(session, result, false);
                }

            } catch (Exception e) {
                SPFChecker checker = null;
                while (e != null) {
                    while (checker == null || !(checker instanceof SPFCheckerExceptionCatcher)) {
                        checker = session.popChecker();
                    }
                    try {
View Full Code Here

        // Setup the data
        spfData = new SPFSession(mailFrom, hostName, ipAddress);
     

        SPFChecker resultHandler = new DefaultSPFChecker(log);
       
        spfData.pushChecker(resultHandler);
        spfData.pushChecker(this);
       
        FutureSPFResult ret = new FutureSPFResult(log);
View Full Code Here

    public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
            NoneException, TempErrorException, NeutralException {

        // if we already have a result we don't need to add further processing.
        if (spfData.getCurrentResultExpanded() == null && spfData.getCurrentResult() == null) {
            SPFChecker policyChecker = new PolicyChecker(getPolicies());
            SPFChecker recordChecker = new SPFRecordChecker();
           
            spfData.pushChecker(recordChecker);
            spfData.pushChecker(policyChecker);
        }
       
View Full Code Here

           
            LinkedList<SPFChecker> policyCheckers = new LinkedList<SPFChecker>();
           
            Iterator<SPFChecker> i = spfRecord.iterator();
            while (i.hasNext()) {
                SPFChecker checker = i.next();
                policyCheckers.add(checker);
            }

            while (policyCheckers.size() > 0) {
                SPFChecker removeLast = policyCheckers.removeLast();
                spfData.pushChecker(removeLast);
            }

            return null;
        }
View Full Code Here

        public DNSLookupContinuation checkSPF(SPFSession spfData)
                throws PermErrorException, TempErrorException,
                NeutralException, NoneException {
           
            while (policies.size() > 0) {
                SPFChecker removeLast = policies.removeLast();
                spfData.pushChecker(removeLast);
            }
           
            return null;
        }
View Full Code Here

TOP

Related Classes of org.apache.james.jspf.core.SPFChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.