/** * Handle an incoming response. Cache answers, and pass them on to the appropriate questions. * * @exception IOException */ void handleResponse(DNSIncoming msg) throws IOException { final long now = System.currentTimeMillis(); boolean hostConflictDetected = false; boolean serviceConflictDetected = false; for (DNSRecord newRecord : msg.getAllAnswers()) { this.handleRecord(newRecord, now); if (DNSRecordType.TYPE_A.equals(newRecord.getRecordType()) || DNSRecordType.TYPE_AAAA.equals(newRecord.getRecordType())) { hostConflictDetected |= newRecord.handleResponse(this); } else { serviceConflictDetected |= newRecord.handleResponse(this); } } if (hostConflictDetected || serviceConflictDetected) { this.startProber(); } }
/** * Handle an incoming response. Cache answers, and pass them on to the appropriate questions. * * @exception IOException */ void handleResponse(DNSIncoming msg) throws IOException { final long now = System.currentTimeMillis(); boolean hostConflictDetected = false; boolean serviceConflictDetected = false; for (DNSRecord newRecord : msg.getAllAnswers()) { this.handleRecord(newRecord, now); if (DNSRecordType.TYPE_A.equals(newRecord.getRecordType()) || DNSRecordType.TYPE_AAAA.equals(newRecord.getRecordType())) { hostConflictDetected |= newRecord.handleResponse(this); } else { serviceConflictDetected |= newRecord.handleResponse(this); } } if (hostConflictDetected || serviceConflictDetected) { this.startProber(); } }
/** * Handle an incoming response. Cache answers, and pass them on to the appropriate questions. * * @exception IOException */ void handleResponse(DNSIncoming msg) throws IOException { final long now = System.currentTimeMillis(); boolean hostConflictDetected = false; boolean serviceConflictDetected = false; for (DNSRecord newRecord : msg.getAllAnswers()) { this.handleRecord(newRecord, now); if (DNSRecordType.TYPE_A.equals(newRecord.getRecordType()) || DNSRecordType.TYPE_AAAA.equals(newRecord.getRecordType())) { hostConflictDetected |= newRecord.handleResponse(this); } else { serviceConflictDetected |= newRecord.handleResponse(this); } } if (hostConflictDetected || serviceConflictDetected) { this.startProber(); } }
/** * Handle an incoming response. Cache answers, and pass them on to the appropriate questions. * * @exception IOException */ void handleResponse(DNSIncoming msg) throws IOException { final long now = System.currentTimeMillis(); boolean hostConflictDetected = false; boolean serviceConflictDetected = false; List<DNSRecord> allAnswers = msg.getAllAnswers(); allAnswers = aRecordsLast(allAnswers); for (DNSRecord newRecord : allAnswers) { this.handleRecord(newRecord, now); if (DNSRecordType.TYPE_A.equals(newRecord.getRecordType()) || DNSRecordType.TYPE_AAAA.equals(newRecord.getRecordType())) { hostConflictDetected |= newRecord.handleResponse(this); } else { serviceConflictDetected |= newRecord.handleResponse(this); } } if (hostConflictDetected || serviceConflictDetected) { this.startProber(); } }