org.xbill.DNS.Message.findRRset()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.xbill.DNS.Message.findRRset()方法的一些代码示例,展示了Message.findRRset()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.findRRset()方法的具体详情如下:
包路径:org.xbill.DNS.Message
类名称:Message
方法名:findRRset

Message.findRRset介绍

暂无

代码示例

代码示例来源:origin: net.sf.dnsjava-osgi/dnsjava-osgi

/**
 * Determines if an RRset with the given name and type is already
 * present in any section.
 * @see RRset
 * @see Section
 */
public boolean
findRRset(Name name, int type) {
  return (findRRset(name, type, Section.ANSWER) ||
    findRRset(name, type, Section.AUTHORITY) ||
    findRRset(name, type, Section.ADDITIONAL));
}

代码示例来源:origin: org.littleshoot/dnsjava

/**
 * Determines if an RRset with the given name and type is already
 * present in any section.
 * @see RRset
 * @see Section
 */
public boolean
findRRset(Name name, int type) {
  return (findRRset(name, type, Section.ANSWER) ||
    findRRset(name, type, Section.AUTHORITY) ||
    findRRset(name, type, Section.ADDITIONAL));
}

代码示例来源:origin: dnsjava/dnsjava

/**
 * Determines if an RRset with the given name and type is already
 * present in any section.
 * @see RRset
 * @see Section
 */
public boolean
findRRset(Name name, int type) {
  return (findRRset(name, type, Section.ANSWER) ||
    findRRset(name, type, Section.AUTHORITY) ||
    findRRset(name, type, Section.ADDITIONAL));
}

代码示例来源:origin: tiandawu/IotXmpp

/**
 * Determines if an RRset with the given name and type is already
 * present in any section.
 * @see RRset
 * @see Section
 */
public boolean
findRRset(Name name, int type) {
  return (findRRset(name, type, Section.ANSWER) ||
    findRRset(name, type, Section.AUTHORITY) ||
    findRRset(name, type, Section.ADDITIONAL));
}

代码示例来源:origin: dnsjava/dnsjava

void
addRRset(Name name, Message response, RRset rrset, int section, int flags) {
  for (int s = 1; s <= section; s++)
    if (response.findRRset(name, rrset.getType(), s))
      return;
  if ((flags & FLAG_SIGONLY) == 0) {
    Iterator it = rrset.rrs();
    while (it.hasNext()) {
      Record r = (Record) it.next();
      if (r.getName().isWild() && !name.isWild())
        r = r.withName(name);
      response.addRecord(r, section);
    }
  }
  if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
    Iterator it = rrset.sigs();
    while (it.hasNext()) {
      Record r = (Record) it.next();
      if (r.getName().isWild() && !name.isWild())
        r = r.withName(name);
      response.addRecord(r, section);
    }
  }
}

代码示例来源:origin: org.jboss.resteasy/resteasy-eagledns-fork

private void addRRset(Name name, Message response, RRset rrset, int section, int flags) {
  for (int s = 1; s <= section; s++) {
    if (response.findRRset(name, rrset.getType(), s)) {
      return;
    }
  }
  if ((flags & FLAG_SIGONLY) == 0) {
    Iterator<?> it = rrset.rrs();
    while (it.hasNext()) {
      Record r = (Record) it.next();
      if (r.getName().isWild() && !name.isWild()) {
        r = r.withName(name);
      }
      response.addRecord(r, section);
    }
  }
  if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
    Iterator<?> it = rrset.sigs();
    while (it.hasNext()) {
      Record r = (Record) it.next();
      if (r.getName().isWild() && !name.isWild()) {
        r = r.withName(name);
      }
      response.addRecord(r, section);
    }
  }
}

代码示例来源:origin: org.echocat.jomon.net/common

void addRRset(Name name, Message response, RRset rrset, int section, int flags) {
  for (int s = 1; s <= section; s++) {
    if (response.findRRset(name, rrset.getType(), s)) {
      return;
    }
  }
  if ((flags & FLAG_SIGONLY) == 0) {
    final Iterator<?> it = rrset.rrs();
    while (it.hasNext()) {
      Record r = (Record) it.next();
      if (r.getName().isWild() && !name.isWild()) {
        r = r.withName(name);
      }
      response.addRecord(r, section);
    }
  }
  if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
    final Iterator<?> it = rrset.sigs();
    while (it.hasNext()) {
      Record r = (Record) it.next();
      if (r.getName().isWild() && !name.isWild()) {
        r = r.withName(name);
      }
      response.addRecord(r, section);
    }
  }
}

代码示例来源:origin: OpenNMS/opennms

void addRRset(final Name name, final Message response, final RRset rrset, final int section, final int flags) {
  for (int s = 1; s <= section; s++) {
    if (response.findRRset(name, rrset.getType(), s)) return;
  }
  if ((flags & FLAG_SIGONLY) == 0) {
    @SuppressWarnings("unchecked")
    final Iterator<Record> it = rrset.rrs();
    while (it.hasNext()) {
      final Record r = it.next();
      if (r.getName().isWild() && !name.isWild()) {
        response.addRecord(r.withName(name), section);
      } else {
        response.addRecord(r, section);
      }
    }
  }
  if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
    @SuppressWarnings("unchecked")
    final Iterator<Record> it = rrset.sigs();
    while (it.hasNext()) {
      final Record r = it.next();
      if (r.getName().isWild() && !name.isWild()) {
        response.addRecord(r.withName(name), section);
      } else {
        response.addRecord(r, section);
      }
    }
  }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-registry

int flags) {
for (int s = 1; s <= section; s++) {
 if (response.findRRset(name, rrset.getType(), s)) {
  return;

相关文章