Examples of DNSLookupContinuation


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

            NoneException {
        SPF1Record res = (SPF1Record) spfData.getAttribute(SPF1Utils.ATTRIBUTE_SPF1_RECORD);
        if (res == null) {
            String currentDomain = spfData.getCurrentDomain();
            if (CHECK_ONLY_TXT_RECORDS) {
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.TXT), new SPFRecordHandlerDNSResponseListener());
            } else {
                return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.SPF), new SPFRetrieverDNSResponseListener());
            }
           
        }
        return null;
    }
View Full Code Here

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

                List spfR = response.getResponse();
               
                if (spfR == null || spfR.isEmpty()) {
                   
                    String currentDomain = session.getCurrentDomain();
                    return new DNSLookupContinuation(new DNSRequest(currentDomain, DNSRequest.TXT), new SPFRecordHandlerDNSResponseListener());

                } else {
                   
                    String record = extractSPFRecord(spfR);
                    if (record != null) {
View Full Code Here

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

         */
        public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
                NoneException, TempErrorException, NeutralException {
            String host = macroExpand.expand(getHost(), spfData, MacroExpand.DOMAIN);

            return new DNSLookupContinuation(new DNSRequest(host, DNSRequest.TXT), ExpModifier.this);
        }
View Full Code Here

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

        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

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

           
            Integer respId = (Integer) resp.getId();
            SPFSession session = (SPFSession) sessions.remove(respId);
            FutureSPFResult result = (FutureSPFResult) results.remove(respId);
           
            DNSLookupContinuation cont = (DNSLookupContinuation) session.getAttribute(ATTRIBUTE_STAGED_EXECUTOR_CONTINUATION);
           
            DNSResponse response;
            if (resp.getException() != null) {
                response = new DNSResponse((TimeoutException) resp.getException());
            } else {
                response = new DNSResponse((List) resp.getValue());
            }
           
           
            try {
                cont = cont.getListener().onDNSResponse(response, session);
               
                if (cont != null) {
                    invokeAsynchService(session, result, cont, false);
                } else {
                    execute(session, result, false);
View Full Code Here

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

        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
                                .getRequest()));
                    } catch (TimeoutException e) {
                        response = new DNSResponse(e);
                    }
                    cont = cont.getListener().onDNSResponse(response, session);
                }
            } catch (Exception e) {
                while (e != null) {
                    while (checker == null || !(checker instanceof SPFCheckerExceptionCatcher)) {
                        checker = session.popChecker();
View Full Code Here

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

        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

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

           
            Integer respId = (Integer)resp.getId();
            SPFSession session = sessions.remove(respId);
            FutureSPFResult result = results.remove(respId);
           
            DNSLookupContinuation cont = (DNSLookupContinuation) session.getAttribute(ATTRIBUTE_STAGED_EXECUTOR_CONTINUATION);
           
            DNSResponse response;
            if (resp.getException() != null) {
                response = new DNSResponse((TimeoutException) resp.getException());
            } else {
                response = new DNSResponse(resp.getValue());
            }
           
           
            try {
                cont = cont.getListener().onDNSResponse(response, session);
               
                if (cont != null) {
                    invokeAsynchService(session, result, cont, false);
                } else {
                    execute(session, result, false);
View Full Code Here

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

         */
        public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
                NoneException, TempErrorException, NeutralException {
            String host = macroExpand.expand(getHost(), spfData, MacroExpand.DOMAIN);

            return new DNSLookupContinuation(new DNSRequest(host, DNSRequest.TXT), ExpModifier.this);
        }
View Full Code Here

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

       * @see org.apache.james.jspf.core.SPFChecker#checkSPF(org.apache.james.jspf.core.SPFSession)
       */
      public DNSLookupContinuation checkSPF(SPFSession spfData) throws PermErrorException,
                TempErrorException, NeutralException, NoneException {
            String host = expandHost(spfData);
            return new DNSLookupContinuation(new DNSRequest(host,DNSRequest.A), ExistsMechanism.this);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.