Home | History | Annotate | Download | only in impl

Lines Matching defs:dns

28  * DNS record
77 abstract boolean handleQuery(JmDNSImpl dns, long expirationTime);
84 abstract boolean handleResponse(JmDNSImpl dns);
89 abstract DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException;
330 boolean handleQuery(JmDNSImpl dns, long expirationTime) {
331 if (dns.getLocalHost().conflictWithRecord(this)) {
332 DNSRecord.Address localAddress = dns.getLocalHost().getDNSAddressRecord(this.getRecordType(), this.isUnique(), DNSConstants.DNS_TTL);
346 if (dns.isProbing() && comparison > 0) {
348 dns.getLocalHost().incrementHostName();
349 dns.getCache().clear();
350 for (ServiceInfo serviceInfo : dns.getServices().values()) {
355 dns.revertState();
365 boolean handleResponse(JmDNSImpl dns) {
366 if (dns.getLocalHost().conflictWithRecord(this)) {
369 if (dns.isProbing()) {
370 dns.getLocalHost().incrementHostName();
371 dns.getCache().clear();
372 for (ServiceInfo serviceInfo : dns.getServices().values()) {
377 dns.revertState();
384 DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException {
404 public ServiceEvent getServiceEvent(JmDNSImpl dns) {
406 ((ServiceInfoImpl) info).setDns(dns);
407 return new ServiceEventImpl(dns, info.getType(), info.getName(), info);
466 boolean handleQuery(JmDNSImpl dns, long expirationTime) {
473 boolean handleResponse(JmDNSImpl dns) {
484 DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException {
514 public ServiceEvent getServiceEvent(JmDNSImpl dns) {
516 ((ServiceInfoImpl) info).setDns(dns);
519 return new ServiceEventImpl(dns, domainName, serviceName, info);
583 boolean handleQuery(JmDNSImpl dns, long expirationTime) {
590 boolean handleResponse(JmDNSImpl dns) {
594 * ServiceInfo info = (ServiceInfo) dns.services.get(name.toLowerCase()); if (info != null) { if (! Arrays.equals(text,info.text)) { info.revertState(); return true; } }
600 DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException {
618 public ServiceEvent getServiceEvent(JmDNSImpl dns) {
620 ((ServiceInfoImpl) info).setDns(dns);
621 return new ServiceEventImpl(dns, info.getType(), info.getName(), info);
724 boolean handleQuery(JmDNSImpl dns, long expirationTime) {
725 ServiceInfoImpl info = (ServiceInfoImpl) dns.getServices().get(this.getKey());
726 if (info != null && (info.isAnnouncing() || info.isAnnounced()) && (_port != info.getPort() || !_server.equalsIgnoreCase(dns.getLocalHost().getName()))) {
728 DNSRecord.Service localService = new DNSRecord.Service(info.getQualifiedName(), DNSRecordClass.CLASS_IN, DNSRecordClass.UNIQUE, DNSConstants.DNS_TTL, info.getPriority(), info.getWeight(), info.getPort(), dns.getLocalHost().getName());
732 if (dns.getInetAddress().equals(getRecordSource())) {
754 info.setName(dns.incrementName(info.getName()));
755 dns.getServices().remove(oldName);
756 dns.getServices().put(info.getQualifiedName().toLowerCase(), info);
774 boolean handleResponse(JmDNSImpl dns) {
775 ServiceInfoImpl info = (ServiceInfoImpl) dns.getServices().get(this.getKey());
776 if (info != null && (_port != info.getPort() || !_server.equalsIgnoreCase(dns.getLocalHost().getName()))) {
781 info.setName(dns.incrementName(info.getName()));
782 dns.getServices().remove(oldName);
783 dns.getServices().put(info.getQualifiedName().toLowerCase(), info);
794 DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException {
795 ServiceInfoImpl info = (ServiceInfoImpl) dns.getServices().get(this.getKey());
797 if (this._port == info.getPort() != _server.equals(dns.getLocalHost().getName())) {
798 return dns.addAnswer(in, addr, port, out, new DNSRecord.Service(info.getQualifiedName(), DNSRecordClass.CLASS_IN, DNSRecordClass.UNIQUE, DNSConstants.DNS_TTL, info.getPriority(), info.getWeight(), info.getPort(), dns
819 public ServiceEvent getServiceEvent(JmDNSImpl dns) {
821 ((ServiceInfoImpl) info).setDns(dns);
831 // return new ServiceEventImpl(dns, domainName, serviceName, info);
832 return new ServiceEventImpl(dns, info.getType(), info.getName(), info);
871 DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException {
880 boolean handleQuery(JmDNSImpl dns, long expirationTime) {
889 boolean handleResponse(JmDNSImpl dns) {
948 public ServiceEvent getServiceEvent(JmDNSImpl dns) {
950 ((ServiceInfoImpl) info).setDns(dns);
951 return new ServiceEventImpl(dns, info.getType(), info.getName(), info);
994 * @param dns
995 * DNS serviced by this event
998 public abstract ServiceEvent getServiceEvent(JmDNSImpl dns);