public void execute()

in resolver/src/main/java/org/apache/james/jspf/executor/StagedMultipleSPFExecutor.java [117:146]


    public void execute(SPFSession session, FutureSPFResult result, boolean throttle) {
        SPFChecker checker;
        while ((checker = session.popChecker()) != null) {
            // only execute checkers we added (better recursivity)
            LOGGER.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;
                }
            } catch (Exception e) {
                while (e != null) {
                    checker = session.popChecker(c -> c instanceof SPFCheckerExceptionCatcher);
                    if (checker == null) {
                        // Error case not handled by JSPF. Throw to avoid infinite loop. See JSPF-110.
                        throw new RuntimeException("SPFCheckerExceptionCatcher implementation not found, session: " + session, e);
                    }
                    try {
                        ((SPFCheckerExceptionCatcher) checker).onException(e, session);
                        e = null;
                    } catch (SPFResultException ex) {
                        e = ex;
                    }
                }
            }
        }
        result.setSPFResult(session);
    }