Examples of ARecord


Examples of org.xbill.DNS.ARecord

            Record[] records = lookupNoException(name, Type.A, "A");

            if (records != null && records.length >= 1) {
                InetAddress[] addrs = new InetAddress[records.length];
                for (int i = 0; i < records.length; i++) {
                    ARecord a = (ARecord) records[i];
                    addrs[i] = InetAddress.getByAddress(name, a.getAddress().getAddress());
                }
                return addrs;
            } else
                throw e;
        }
View Full Code Here

Examples of org.xbill.DNS.ARecord

  }

  @Override
  protected ARecord createRecord(final Name name, final int dclass,
      final long ttl, final ObjectNode recordNode) {
    return new ARecord(name, dclass, ttl, getNodeAddressValue(recordNode));
  }
View Full Code Here

Examples of org.xbill.DNS.ARecord

            command = new ZoneUpdateResourceRecordsCommand.Builder()
                    .withId("<my-zone-id>")
                    .withVersion(1L)
                    .withResourceRecords(
                            Sets.newHashSet(
                                    (Record) new ARecord(Name.fromString("myzone.com."), DClass.IN, 3600,
                                            InetAddress.getByName("1.2.3.4"))))
                    .build();
        } catch (TextParseException | UnknownHostException e) {
            e.printStackTrace();
            System.exit(1);
View Full Code Here

Examples of org.xbill.DNS.ARecord

            command = new ZoneUpdateResourceRecordsCommand.Builder()
                    .withId("<my-zone-id>")
                    .withVersion(1L)
                    .withResourceRecords(
                            Sets.newHashSet(
                                    (Record) new ARecord(Name.fromString("myzone.com."), DClass.IN, 3600,
                                            InetAddress.getByName("1.2.3.4"))))
                    .build();
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
View Full Code Here

Examples of org.xbill.DNS.ARecord

    private synchronized void updateContainers() throws Exception {
        //Create A Records for Containers
        for (Container container : fabricService.get().getContainers()) {
            String id = container.getId();
            String address = container.getIp();
            Record record = new ARecord(Name.fromString(id, containerDomain), DClass.IN, minimumTtl, InetAddress.getByName(address));
            fabricZone.addRecord(record);
        }
    }
View Full Code Here

Examples of org.xbill.DNS.ARecord

        if (rr != null && rr.length > 0) {
            records = new ArrayList();
            for (int i = 0; i < rr.length; i++) {
                switch (rr[i].getType()) {
                    case Type.A:
                        ARecord a = (ARecord) rr[i];
                        records.add(a.getAddress().getHostAddress());
                        break;
                    case Type.AAAA:
                        AAAARecord aaaa = (AAAARecord) rr[i];
                        records.add(aaaa.getAddress().getHostAddress());
                        break;
View Full Code Here

Examples of org.xbill.DNS.ARecord

                                        }
                                    }
                                } else {
                                    Object value = hm.get(type);
                                    if ("A".equals(type)) {
                                        records.add(new ARecord(hostname,
                                                DClass.IN, 3600, Address
                                                        .getByAddress((String) value)));
                                    } else if ("AAAA".equals(type)) {
                                        records.add(new AAAARecord(hostname,
                                                DClass.IN, 3600, Address
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.