Package org.xbill.DNS

Examples of org.xbill.DNS.SOARecord


      this.records = null;
      this.downloaded = null;

    }else{

      SOARecord soaRecord = zone.getSOA();

      this.name = soaRecord.getName().toString();
      this.dclass = DClass.string(soaRecord.getDClass());
      this.ttl = soaRecord.getTTL();
      this.primaryDNS = soaRecord.getHost().toString();
      this.adminEmail = soaRecord.getAdmin().toString();
      this.serial = soaRecord.getSerial();
      this.refresh = soaRecord.getRefresh();
      this.retry = soaRecord.getRetry();
      this.expire = soaRecord.getExpire();
      this.minimum = soaRecord.getMinimum();
      this.secondary = secondary;

      if(secondary){
        this.downloaded = new java.sql.Timestamp(System.currentTimeMillis());
      }
View Full Code Here


  public Zone toZone() throws IOException{

    Name zoneName = Name.fromString(name);
    Name primaryNS = Name.fromString(this.primaryDNS);

    SOARecord soaRecord = new SOARecord(zoneName, DClass.value(dclass), ttl, primaryNS, Name.fromString(this.adminEmail), serial, refresh, retry, expire, minimum);

    //Record primaryNSRecord = Record.newRecord(primaryNS, Type.NS, DClass.value(dclass), ttl);

    int recordCount;
View Full Code Here

    public synchronized void setData(HashMap zonedata) {
        try {
            this.timeoutServers = new HashSet();
            List records = new LinkedList();

            records.add(new SOARecord(Name.root, DClass.IN, 3600, Name.root,
                    Name.root, 857623948, 0, 0, 0, 0));
            records.add(new NSRecord(Name.root, DClass.IN, 3600, Name.root));

            Iterator hosts = zonedata.keySet().iterator();
            while (hosts.hasNext()) {
View Full Code Here

    public synchronized void setData(HashMap zonedata) {
        try {
            this.timeoutServers = new HashSet();
            List records = new LinkedList();

            records.add(new SOARecord(Name.root, DClass.IN, 3600, Name.root,
                    Name.root, 857623948, 0, 0, 0, 0));
            records.add(new NSRecord(Name.root, DClass.IN, 3600, Name.root));

            Iterator hosts = zonedata.keySet().iterator();
            while (hosts.hasNext()) {
View Full Code Here

      rmap.put("port", srv.getPort());
      rmap.put("priority", srv.getPriority());
      rmap.put("weight", srv.getWeight());
    }
    else if (rec instanceof SOARecord) {
      SOARecord soa = (SOARecord) rec;
      rmap.put("admin", soa.getAdmin().toString());
      rmap.put("expire", soa.getExpire());
      rmap.put("host", soa.getHost().toString());
      rmap.put("min", soa.getMinimum());
      rmap.put("refresh", soa.getRefresh());
      rmap.put("retry", soa.getRetry());
      rmap.put("serial", soa.getSerial());
    }
    else
    {
      rmap.put("rdata", rec.rdataToString());
    }
View Full Code Here

    public synchronized void setData(Map<String, List<?>> map) {
        try {
            this.timeoutServers = new HashSet<Name>();
            List<Record> records = new LinkedList<Record>();

            records.add(new SOARecord(Name.root, DClass.IN, 3600, Name.root,
                    Name.root, 857623948, 0, 0, 0, 0));
            records.add(new NSRecord(Name.root, DClass.IN, 3600, Name.root));

            Iterator<String> hosts = map.keySet().iterator();
            while (hosts.hasNext()) {
View Full Code Here

      this.records = null;
      this.downloaded = null;

    }else{

      SOARecord soaRecord = zone.getSOA();

      this.name = soaRecord.getName().toString();
      this.dclass = DClass.string(soaRecord.getDClass());
      this.ttl = soaRecord.getTTL();
      this.primaryDNS = soaRecord.getHost().toString();
      this.adminEmail = soaRecord.getAdmin().toString();
      this.serial = soaRecord.getSerial();
      this.refresh = soaRecord.getRefresh();
      this.retry = soaRecord.getRetry();
      this.expire = soaRecord.getExpire();
      this.minimum = soaRecord.getMinimum();
      this.secondary = secondary;

      if(secondary){
        this.downloaded = new java.sql.Timestamp(System.currentTimeMillis());
      }
View Full Code Here

  public Zone toZone() throws IOException{

    Name zoneName = Name.fromString(name);
    Name primaryNS = Name.fromString(this.primaryDNS);

    SOARecord soaRecord = new SOARecord(zoneName, DClass.value(dclass), ttl, primaryNS, Name.fromString(this.adminEmail), serial, refresh, retry, expire, minimum);

    //Record primaryNSRecord = Record.newRecord(primaryNS, Type.NS, DClass.value(dclass), ttl);

    int recordCount;
View Full Code Here

  }

  @Override
  protected SOARecord createRecord(final Name name, final int dclass,
      final long ttl, final ObjectNode recordNode) {
    return new SOARecord(name, dclass, ttl, getNodeNameValue(recordNode,
        "host"), getNodeNameValue(recordNode, "admin"),
        getNodeLongValue(recordNode, "serial"), getNodeLongValue(
            recordNode, "refresh"), getNodeLongValue(recordNode,
            "retry"), getNodeLongValue(recordNode, "expire"),
        getNodeLongValue(recordNode, "minimum"));
View Full Code Here

        Name admin = Name.fromString(adminServer, domainRoot);

        FabricService service = fabricService.get();
        List<Record> records = new ArrayList<>();
        //TODO: At some point we need to manage the serial number.
        records.add(new SOARecord(domainRoot, DClass.IN, DAY, ns, admin, 1, refresh, retry, expire, minimumTtl));
        records.add(new NSRecord(domainRoot, DClass.IN, DAY, ns));
        return new Zone(domainRoot, records.toArray(new Record[records.size()]));
    }
View Full Code Here

TOP

Related Classes of org.xbill.DNS.SOARecord

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.