@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().keySet().contains(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().containsKey(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().containsKey(name); }
@Override public boolean iAmTheOnlyOne(JmDNSImpl jmDNSImpl) { String name = this.getName().toLowerCase(); return jmDNSImpl.getLocalHost().getName().equals(name) || jmDNSImpl.getServices().containsKey(name); }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; long now = System.currentTimeMillis(); for (ServiceInfo info : this.getDns().getServices().values()) { newOut = this.addAnswer(newOut, new DNSRecord.Pointer(info.getType(), DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, info.getQualifiedName()), now); // newOut = this.addAnswer(newOut, new DNSRecord.Service(info.getQualifiedName(), DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, info.getPriority(), info.getWeight(), info.getPort(), // this.getDns().getLocalHost().getName()), now); } return newOut; }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; long now = System.currentTimeMillis(); for (ServiceInfo info : this.getDns().getServices().values()) { newOut = this.addAnswer(newOut, new DNSRecord.Pointer(info.getType(), DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, info.getQualifiedName()), now); // newOut = this.addAnswer(newOut, new DNSRecord.Service(info.getQualifiedName(), DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, info.getPriority(), info.getWeight(), info.getPort(), // this.getDns().getLocalHost().getName()), now); } return newOut; }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; long now = System.currentTimeMillis(); for (ServiceInfo info : this.getDns().getServices().values()) { newOut = this.addAnswer(newOut, new DNSRecord.Pointer(info.getType(), DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, info.getQualifiedName()), now); // newOut = this.addAnswer(newOut, new DNSRecord.Service(info.getQualifiedName(), DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE, DNSConstants.DNS_TTL, info.getPriority(), info.getWeight(), info.getPort(), // this.getDns().getLocalHost().getName()), now); } return newOut; }
@Override DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException { ServiceInfoImpl info = (ServiceInfoImpl) dns.getServices().get(this.getKey()); if (info != null) { if (this._port == info.getPort() != _server.equals(dns.getLocalHost().getName())) { 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 .getLocalHost().getName())); } } return out; }
@Override DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException { ServiceInfoImpl info = (ServiceInfoImpl) dns.getServices().get(this.getKey()); if (info != null) { if (this._port == info.getPort() != _server.equals(dns.getLocalHost().getName())) { 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 .getLocalHost().getName())); } } return out; }
@Override DNSOutgoing addAnswer(JmDNSImpl dns, DNSIncoming in, InetAddress addr, int port, DNSOutgoing out) throws IOException { ServiceInfoImpl info = (ServiceInfoImpl) dns.getServices().get(this.getKey()); if (info != null) { if (this._port == info.getPort() != _server.equals(dns.getLocalHost().getName())) { 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 .getLocalHost().getName())); } } return out; }