Package io.netty.handler.codec.dns

Examples of io.netty.handler.codec.dns.DnsQuestion


    ScheduledFuture<?> timeoutFuture() {
        return timeoutFuture;
    }

    void query() {
        final DnsQuestion question = this.question;

        if (remainingTries <= 0 || !nameServerAddresses.hasNext()) {
            parent.promises.set(id, null);

            int tries = maxTries - remainingTries;
View Full Code Here


                break;
            default:
                throw new Error();
            }

            query(parent.nameServerAddresses, new DnsQuestion(hostname, type));
        }
    }
View Full Code Here

        if (resolvedAddresses == null) {
            // .. and we could not find any A/AAAA records.
            if (!triedCNAME) {
                // As the last resort, try to query CNAME, just in case the name server has it.
                triedCNAME = true;
                query(parent.nameServerAddresses, new DnsQuestion(hostname, DnsType.CNAME, DnsClass.IN));
                return;
            }
        }

        // We have at least one resolved address or tried CNAME as the last resort..
View Full Code Here

        trace.append(": ");
        trace.append(name);
        trace.append(" CNAME ");
        trace.append(cname);

        query(parent.nameServerAddresses, new DnsQuestion(cname, DnsType.A, DnsClass.IN));
        query(parent.nameServerAddresses, new DnsQuestion(cname, DnsType.AAAA, DnsClass.IN));
    }
View Full Code Here

                if (questions.size() != 1) {
                    logger.warn("Received a DNS response with invalid number of questions: {}", res);
                    return;
                }

                final DnsQuestion q = qCtx.question();
                if (!q.equals(questions.get(0))) {
                    logger.warn("Received a mismatching DNS response: {}", res);
                    return;
                }

                // Cancel the timeout task.
View Full Code Here

        futures.put(unresolved, resolver.resolve(unresolved));
    }

    private static void queryMx(Map<String, Future<DnsResponse>> futures, String hostname) throws Exception {
        futures.put(hostname, resolver.query(new DnsQuestion(hostname, DnsType.MX)));
    }
View Full Code Here

TOP

Related Classes of io.netty.handler.codec.dns.DnsQuestion

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.