Package org.apache.james.jspf.core

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


     */
    public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException, TempErrorException, NoneException, NeutralException {
        // update currentDepth
        spfData.increaseCurrentDepth();
       
        SPFChecker cleanupAndResultHandler = new CleanupAndResultChecker().init(spfData);
        spfData.pushChecker(cleanupAndResultHandler);
       
        spfData.pushChecker(new ExpandedChecker());
        return macroExpand.checkExpand(getHost(), spfData, MacroExpand.DOMAIN);
    }
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

            spfData.setCurrentResultExpanded(e1.getResult());
        } catch (NoneException e1) {
            spfData.setCurrentResultExpanded(e1.getResult());
        }

        SPFChecker resultHandler = new DefaultSPFChecker();
       
        spfData.pushChecker(resultHandler);
        spfData.pushChecker(this);
        spfData.pushExceptionCatcher(new SPFCheckerExceptionCatcherImplementation(resultHandler, log));
       
View Full Code Here

     * @see org.apache.james.jspf.core.SPFChecker#checkSPF(org.apache.james.jspf.core.SPFSession)
     */
    public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
            NoneException, TempErrorException, NeutralException {

        SPFChecker policyChecker = new PolicyChecker(getPolicies());
        SPFChecker recordChecker = new SPFRecordChecker();
       
        spfData.pushChecker(recordChecker);
        spfData.pushChecker(policyChecker);
       
        return null;
View Full Code Here

         */
        public void onException(Exception exception, SPFSession session)
                throws PermErrorException, NoneException, TempErrorException,
                NeutralException {

            SPFChecker checker;
            while ((checker = session.popChecker())!=resultHandler) {
                log.debug("Redirect resulted in exception. Removing checker: "+checker);
            }

            String result;
View Full Code Here

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

            while (policyCheckers.size() > 0) {
                SPFChecker removeLast = (SPFChecker) 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 = (SPFChecker) policies.removeLast();
                spfData.pushChecker(removeLast);
            }
           
            return null;
        }
View Full Code Here

     */
    public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException, TempErrorException, NoneException, NeutralException {
        // update currentDepth
        spfData.increaseCurrentDepth();
       
        SPFChecker finallyChecker = new FinallyChecker().init(spfData);
       
        SPFChecker cleanupAndResultHandler = new CleanupAndResultChecker().init(finallyChecker);
        spfData.pushChecker(cleanupAndResultHandler);
        spfData.pushExceptionCatcher(new ExceptionCatcher().setExceptionHandlerChecker(cleanupAndResultHandler, finallyChecker));
       
        spfData.pushChecker(new ExpandedChecker());
        return macroExpand.checkExpand(getHost(), spfData, MacroExpand.DOMAIN);
View Full Code Here

        public void onException(Exception exception, SPFSession session)
                throws PermErrorException, NoneException,
                TempErrorException, NeutralException {
           
            // remove every checker until the initialized one
            SPFChecker checker;
            while ((checker = session.popChecker())!=spfChecker) {
                log.debug("Include resulted in exception. Removing checker: "+checker);
            }
           
            finallyChecker.checkSPF(session);
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.