/** * {@inheritDoc} */ @Override public ServiceInfo getServiceInfo(String type, String name, boolean persistent, long timeout) { final ServiceInfoImpl info = this.resolveServiceInfo(type, name, "", persistent); this.waitForInfoData(info, timeout); return (info.hasData() ? info : null); }
/** * {@inheritDoc} */ @Override public ServiceInfo getServiceInfo(String type, String name, boolean persistent, long timeout) { final ServiceInfoImpl info = this.resolveServiceInfo(type, name, "", persistent); this.waitForInfoData(info, timeout); return (info.hasData() ? info : null); }
/** * {@inheritDoc} */ @Override public ServiceInfo getServiceInfo(String type, String name, boolean persistent, long timeout) { final ServiceInfoImpl info = this.resolveServiceInfo(type, name, "", persistent); this.waitForInfoData(info, timeout); return (info.hasData() ? info : null); }
/** * {@inheritDoc} */ @Override public ServiceInfo getServiceInfo(String type, String name, boolean persistent, long timeout) { final ServiceInfoImpl info = this.resolveServiceInfo(type, name, "", persistent); this.waitForInfoData(info, timeout); return (info.hasData() ? info : null); }
sb.append(this.isPersistent() ? "' is persistent," : "',"); if (this.hasData()) { sb.append(" has data");
buf.append(this.isPersistent() ? "' is persistent," : "',"); buf.append(" has "); buf.append(this.hasData() ? "" : "NO "); buf.append("data"); if (this.getTextBytes().length > 0) {
buf.append(this.isPersistent() ? "' is persistent," : "',"); buf.append(" has "); buf.append(this.hasData() ? "" : "NO "); buf.append("data"); if (this.getTextBytes().length > 0) {
buf.append(this.isPersistent() ? "' is persistent," : "',"); buf.append(" has "); buf.append(this.hasData() ? "" : "NO "); buf.append("data"); if (this.getTextBytes().length > 0) {
@Override protected DNSOutgoing addQuestions(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); if (_info.getServer().length() > 0) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); } } return newOut; }
@Override protected DNSOutgoing addQuestions(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); if (_info.getServer().length() > 0) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); } } return newOut; }
@Override protected DNSOutgoing addQuestions(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); if (_info.getServer().length() > 0) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); } } return newOut; }
@Override protected DNSOutgoing addQuestions(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); if (_info.getServer().length() > 0) { newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); newOut = this.addQuestion(newOut, DNSQuestion.newQuestion(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN, DNSRecordClass.NOT_UNIQUE)); } } return newOut; }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { long now = System.currentTimeMillis(); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN), now); if (_info.getServer().length() > 0) { newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN), now); } } return newOut; }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { long now = System.currentTimeMillis(); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN), now); if (_info.getServer().length() > 0) { newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN), now); } } return newOut; }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { long now = System.currentTimeMillis(); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN), now); if (_info.getServer().length() > 0) { newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN), now); } } return newOut; }
@Override protected DNSOutgoing addAnswers(DNSOutgoing out) throws IOException { DNSOutgoing newOut = out; if (!_info.hasData()) { long now = System.currentTimeMillis(); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_SRV, DNSRecordClass.CLASS_IN), now); newOut = this.addAnswer(newOut, (DNSRecord) this.getDns().getCache().getDNSEntry(_info.getQualifiedName(), DNSRecordType.TYPE_TXT, DNSRecordClass.CLASS_IN), now); if (_info.getServer().length() > 0) { for (DNSEntry addressEntry : this.getDns().getCache().getDNSEntryList(_info.getServer(), DNSRecordType.TYPE_A, DNSRecordClass.CLASS_IN)) { newOut = this.addAnswer(newOut, (DNSRecord) addressEntry, now); } for (DNSEntry addressEntry : this.getDns().getCache().getDNSEntryList(_info.getServer(), DNSRecordType.TYPE_AAAA, DNSRecordClass.CLASS_IN)) { newOut = this.addAnswer(newOut, (DNSRecord) addressEntry, now); } } } return newOut; }
cachedInfo._setText(srvBytes); if (cachedInfo.hasData()) { info = cachedInfo;
cachedInfo._setText(srvBytes); if (cachedInfo.hasData()) { info = cachedInfo;
cachedInfo._setText(srvBytes); if (cachedInfo.hasData()) { info = cachedInfo;
cachedInfo._setText(srvBytes); if (cachedInfo.hasData()) { info = cachedInfo;