@Override public void addAnswers(JmDNSImpl jmDNSImpl, Set<DNSRecord> answers) { String loname = this.getName().toLowerCase(); if (jmDNSImpl.getLocalHost().getName().equalsIgnoreCase(loname)) { // type = DNSConstants.TYPE_A; answers.addAll(jmDNSImpl.getLocalHost().answers(this.isUnique(), DNSConstants.DNS_TTL)); return; } // Service type request if (jmDNSImpl.getServiceTypes().containsKey(loname)) { DNSQuestion question = new Pointer(this.getName(), DNSRecordType.TYPE_PTR, this.getRecordClass(), this.isUnique()); question.addAnswers(jmDNSImpl, answers); return; } this.addAnswersForServiceInfo(jmDNSImpl, answers, (ServiceInfoImpl) jmDNSImpl.getServices().get(loname)); }
@Override public void addAnswers(JmDNSImpl jmDNSImpl, Set<DNSRecord> answers) { String loname = this.getName().toLowerCase(); if (jmDNSImpl.getLocalHost().getName().equalsIgnoreCase(loname)) { // type = DNSConstants.TYPE_A; answers.addAll(jmDNSImpl.getLocalHost().answers(this.isUnique(), DNSConstants.DNS_TTL)); return; } // Service type request if (jmDNSImpl.getServiceTypes().containsKey(loname)) { DNSQuestion question = new Pointer(this.getName(), DNSRecordType.TYPE_PTR, this.getRecordClass(), this.isUnique()); question.addAnswers(jmDNSImpl, answers); return; } this.addAnswersForServiceInfo(jmDNSImpl, answers, (ServiceInfoImpl) jmDNSImpl.getServices().get(loname)); }
@Override public void addAnswers(JmDNSImpl jmDNSImpl, Set<DNSRecord> answers) { String loname = this.getName().toLowerCase(); if (jmDNSImpl.getLocalHost().getName().equalsIgnoreCase(loname)) { // type = DNSConstants.TYPE_A; answers.addAll(jmDNSImpl.getLocalHost().answers(this.isUnique(), DNSConstants.DNS_TTL)); return; } // Service type request if (jmDNSImpl.getServiceTypes().containsKey(loname)) { DNSQuestion question = new Pointer(this.getName(), DNSRecordType.TYPE_PTR, this.getRecordClass(), this.isUnique()); question.addAnswers(jmDNSImpl, answers); return; } this.addAnswersForServiceInfo(jmDNSImpl, answers, (ServiceInfoImpl) jmDNSImpl.getServices().get(loname)); }
@Override public void addAnswers(JmDNSImpl jmDNSImpl, Set<DNSRecord> answers) { String loname = this.getName().toLowerCase(); if (jmDNSImpl.getLocalHost().getName().equalsIgnoreCase(loname)) { // type = DNSConstants.TYPE_A; answers.addAll(jmDNSImpl.getLocalHost().answers(this.getRecordClass(), this.isUnique(), DNSConstants.DNS_TTL)); return; } // Service type request if (jmDNSImpl.getServiceTypes().containsKey(loname)) { DNSQuestion question = new Pointer(this.getName(), DNSRecordType.TYPE_PTR, this.getRecordClass(), this.isUnique()); question.addAnswers(jmDNSImpl, answers); return; } for (ServiceInfo serviceInfo : jmDNSImpl.getServices().values()) { this.addAnswersForServiceInfo(jmDNSImpl, answers, (ServiceInfoImpl) serviceInfo); } }