/** * Return a service information associated with that record if appropriate. * * @return service information */ public ServiceInfo getServiceInfo() { return this.getServiceInfo(false); }
/** * Return a service information associated with that record if appropriate. * * @return service information */ public ServiceInfo getServiceInfo() { return this.getServiceInfo(false); }
/** * Return a service information associated with that record if appropriate. * * @return service information */ public ServiceInfo getServiceInfo() { return this.getServiceInfo(false); }
/** * Return a service information associated with that record if appropriate. * * @return service information */ public ServiceInfo getServiceInfo() { return this.getServiceInfo(false); }
/** * Renew a service when the record become stale. If there is no service collector for the type this method does nothing. * * @param record * DNS record */ public void renewServiceCollector(DNSRecord record) { ServiceInfo info = record.getServiceInfo(); if (_serviceCollectors.containsKey(info.getType().toLowerCase())) { // Create/start ServiceResolver this.startServiceResolver(info.getType()); } }
/** * Renew a service when the record become stale. If there is no service collector for the type this method does nothing. * * @param record * DNS record */ public void renewServiceCollector(DNSRecord record) { ServiceInfo info = record.getServiceInfo(); if (_serviceCollectors.containsKey(info.getType().toLowerCase())) { // Create/start ServiceResolver this.startServiceResolver(info.getType()); } }
/** * Renew a service when the record become stale. If there is no service collector for the type this method does nothing. * * @param record * DNS record */ public void renewServiceCollector(DNSRecord record) { ServiceInfo info = record.getServiceInfo(); if (_serviceCollectors.containsKey(info.getType().toLowerCase())) { // Create/start ServiceResolver this.startServiceResolver(info.getType()); } }
serviceEvents.add(new ServiceEventImpl(this, record.getType(), toUnqualifiedName(record.getType(), record.getName()), record.getServiceInfo()));
serviceEvents.add(new ServiceEventImpl(this, record.getType(), toUnqualifiedName(record.getType(), record.getName()), record.getServiceInfo()));
serviceEvents.add(new ServiceEventImpl(this, record.getType(), toUnqualifiedName(record.getType(), record.getName()), record.getServiceInfo()));
serviceEvents.add(new ServiceEventImpl(this, record.getType(), toUnqualifiedName(record.getType(), record.getName()), record.getServiceInfo()));
} else if (record.isStaleAndShouldBeRefreshed(now)) { record.incrementRefreshPercentage(); String type = record.getServiceInfo().getType().toLowerCase();
DNSEntry pointerEntry = this.getCache().getDNSEntry(new DNSRecord.Pointer(type, DNSRecordClass.CLASS_ANY, false, 0, info.getQualifiedName())); if (pointerEntry instanceof DNSRecord) { ServiceInfoImpl cachedInfo = (ServiceInfoImpl) ((DNSRecord) pointerEntry).getServiceInfo(persistent); if (cachedInfo != null) { DNSEntry serviceEntry = this.getCache().getDNSEntry(info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_ANY); if (serviceEntry instanceof DNSRecord) { ServiceInfo cachedServiceEntryInfo = ((DNSRecord) serviceEntry).getServiceInfo(persistent); if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet4Address address : cachedAddressInfo.getInet4Addresses()) { ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet6Address address : cachedAddressInfo.getInet6Addresses()) { ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());
DNSEntry pointerEntry = this.getCache().getDNSEntry(new DNSRecord.Pointer(type, DNSRecordClass.CLASS_ANY, false, 0, info.getQualifiedName())); if (pointerEntry instanceof DNSRecord) { ServiceInfoImpl cachedInfo = (ServiceInfoImpl) ((DNSRecord) pointerEntry).getServiceInfo(persistent); if (cachedInfo != null) { DNSEntry serviceEntry = this.getCache().getDNSEntry(info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_ANY); if (serviceEntry instanceof DNSRecord) { ServiceInfo cachedServiceEntryInfo = ((DNSRecord) serviceEntry).getServiceInfo(persistent); if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet4Address address : cachedAddressInfo.getInet4Addresses()) { ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet6Address address : cachedAddressInfo.getInet6Addresses()) { ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());
DNSEntry pointerEntry = this.getCache().getDNSEntry(new DNSRecord.Pointer(type, DNSRecordClass.CLASS_ANY, false, 0, info.getQualifiedName())); if (pointerEntry instanceof DNSRecord) { ServiceInfoImpl cachedInfo = (ServiceInfoImpl) ((DNSRecord) pointerEntry).getServiceInfo(persistent); if (cachedInfo != null) { DNSEntry serviceEntry = this.getCache().getDNSEntry(info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_ANY); if (serviceEntry instanceof DNSRecord) { ServiceInfo cachedServiceEntryInfo = ((DNSRecord) serviceEntry).getServiceInfo(persistent); if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet4Address address : cachedAddressInfo.getInet4Addresses()) { ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet6Address address : cachedAddressInfo.getInet6Addresses()) { ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());
DNSEntry pointerEntry = this.getCache().getDNSEntry(new DNSRecord.Pointer(type, DNSRecordClass.CLASS_ANY, false, 0, info.getQualifiedName())); if (pointerEntry instanceof DNSRecord) { ServiceInfoImpl cachedInfo = (ServiceInfoImpl) ((DNSRecord) pointerEntry).getServiceInfo(persistent); if (cachedInfo != null) { DNSEntry serviceEntry = this.getCache().getDNSEntry(info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_ANY); if (serviceEntry instanceof DNSRecord) { ServiceInfo cachedServiceEntryInfo = ((DNSRecord) serviceEntry).getServiceInfo(persistent); if (cachedServiceEntryInfo != null) { cachedInfo = new ServiceInfoImpl(map, cachedServiceEntryInfo.getPort(), cachedServiceEntryInfo.getWeight(), cachedServiceEntryInfo.getPriority(), persistent, (byte[]) null); ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet4Address address : cachedAddressInfo.getInet4Addresses()) { ServiceInfo cachedAddressInfo = ((DNSRecord) addressEntry).getServiceInfo(persistent); if (cachedAddressInfo != null) { for (Inet6Address address : cachedAddressInfo.getInet6Addresses()) { ServiceInfo cachedTextInfo = ((DNSRecord) textEntry).getServiceInfo(persistent); if (cachedTextInfo != null) { cachedInfo._setText(cachedTextInfo.getTextBytes());