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

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

本文整理了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

  1. /**
  2. * Determines if an RRset with the given name and type is already
  3. * present in any section.
  4. * @see RRset
  5. * @see Section
  6. */
  7. public boolean
  8. findRRset(Name name, int type) {
  9. return (findRRset(name, type, Section.ANSWER) ||
  10. findRRset(name, type, Section.AUTHORITY) ||
  11. findRRset(name, type, Section.ADDITIONAL));
  12. }

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

  1. /**
  2. * Determines if an RRset with the given name and type is already
  3. * present in any section.
  4. * @see RRset
  5. * @see Section
  6. */
  7. public boolean
  8. findRRset(Name name, int type) {
  9. return (findRRset(name, type, Section.ANSWER) ||
  10. findRRset(name, type, Section.AUTHORITY) ||
  11. findRRset(name, type, Section.ADDITIONAL));
  12. }

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

  1. /**
  2. * Determines if an RRset with the given name and type is already
  3. * present in any section.
  4. * @see RRset
  5. * @see Section
  6. */
  7. public boolean
  8. findRRset(Name name, int type) {
  9. return (findRRset(name, type, Section.ANSWER) ||
  10. findRRset(name, type, Section.AUTHORITY) ||
  11. findRRset(name, type, Section.ADDITIONAL));
  12. }

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

  1. /**
  2. * Determines if an RRset with the given name and type is already
  3. * present in any section.
  4. * @see RRset
  5. * @see Section
  6. */
  7. public boolean
  8. findRRset(Name name, int type) {
  9. return (findRRset(name, type, Section.ANSWER) ||
  10. findRRset(name, type, Section.AUTHORITY) ||
  11. findRRset(name, type, Section.ADDITIONAL));
  12. }

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

  1. void
  2. addRRset(Name name, Message response, RRset rrset, int section, int flags) {
  3. for (int s = 1; s <= section; s++)
  4. if (response.findRRset(name, rrset.getType(), s))
  5. return;
  6. if ((flags & FLAG_SIGONLY) == 0) {
  7. Iterator it = rrset.rrs();
  8. while (it.hasNext()) {
  9. Record r = (Record) it.next();
  10. if (r.getName().isWild() && !name.isWild())
  11. r = r.withName(name);
  12. response.addRecord(r, section);
  13. }
  14. }
  15. if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
  16. Iterator it = rrset.sigs();
  17. while (it.hasNext()) {
  18. Record r = (Record) it.next();
  19. if (r.getName().isWild() && !name.isWild())
  20. r = r.withName(name);
  21. response.addRecord(r, section);
  22. }
  23. }
  24. }

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

  1. private void addRRset(Name name, Message response, RRset rrset, int section, int flags) {
  2. for (int s = 1; s <= section; s++) {
  3. if (response.findRRset(name, rrset.getType(), s)) {
  4. return;
  5. }
  6. }
  7. if ((flags & FLAG_SIGONLY) == 0) {
  8. Iterator<?> it = rrset.rrs();
  9. while (it.hasNext()) {
  10. Record r = (Record) it.next();
  11. if (r.getName().isWild() && !name.isWild()) {
  12. r = r.withName(name);
  13. }
  14. response.addRecord(r, section);
  15. }
  16. }
  17. if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
  18. Iterator<?> it = rrset.sigs();
  19. while (it.hasNext()) {
  20. Record r = (Record) it.next();
  21. if (r.getName().isWild() && !name.isWild()) {
  22. r = r.withName(name);
  23. }
  24. response.addRecord(r, section);
  25. }
  26. }
  27. }

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

  1. void addRRset(Name name, Message response, RRset rrset, int section, int flags) {
  2. for (int s = 1; s <= section; s++) {
  3. if (response.findRRset(name, rrset.getType(), s)) {
  4. return;
  5. }
  6. }
  7. if ((flags & FLAG_SIGONLY) == 0) {
  8. final Iterator<?> it = rrset.rrs();
  9. while (it.hasNext()) {
  10. Record r = (Record) it.next();
  11. if (r.getName().isWild() && !name.isWild()) {
  12. r = r.withName(name);
  13. }
  14. response.addRecord(r, section);
  15. }
  16. }
  17. if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
  18. final Iterator<?> it = rrset.sigs();
  19. while (it.hasNext()) {
  20. Record r = (Record) it.next();
  21. if (r.getName().isWild() && !name.isWild()) {
  22. r = r.withName(name);
  23. }
  24. response.addRecord(r, section);
  25. }
  26. }
  27. }

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

  1. void addRRset(final Name name, final Message response, final RRset rrset, final int section, final int flags) {
  2. for (int s = 1; s <= section; s++) {
  3. if (response.findRRset(name, rrset.getType(), s)) return;
  4. }
  5. if ((flags & FLAG_SIGONLY) == 0) {
  6. @SuppressWarnings("unchecked")
  7. final Iterator<Record> it = rrset.rrs();
  8. while (it.hasNext()) {
  9. final Record r = it.next();
  10. if (r.getName().isWild() && !name.isWild()) {
  11. response.addRecord(r.withName(name), section);
  12. } else {
  13. response.addRecord(r, section);
  14. }
  15. }
  16. }
  17. if ((flags & (FLAG_SIGONLY | FLAG_DNSSECOK)) != 0) {
  18. @SuppressWarnings("unchecked")
  19. final Iterator<Record> it = rrset.sigs();
  20. while (it.hasNext()) {
  21. final Record r = it.next();
  22. if (r.getName().isWild() && !name.isWild()) {
  23. response.addRecord(r.withName(name), section);
  24. } else {
  25. response.addRecord(r, section);
  26. }
  27. }
  28. }
  29. }

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

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

相关文章