Package org.xbill.DNS

Examples of org.xbill.DNS.AAAARecord


                                    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
                                                        .getByAddress((String) value)));
                                    } else if ("SPF".equals(type)) {
                                        if (value instanceof List) {
                                            records.add(new SPFRecord(hostname,
View Full Code Here


                    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;
                    case Type.MX:
                        MXRecord mx = (MXRecord) rr[i];
                        records.add(mx.getTarget().toString());
                        break;
View Full Code Here

                        case A:
                            ARecord a = (ARecord) rr[i];
                            res = a.getAddress().getHostAddress();
                            break;
                        case AAAA:
                            AAAARecord aaaa = (AAAARecord) rr[i];
                            res = aaaa.getAddress().getHostAddress();
                            break;
                        case MX:
                            MXRecord mx = (MXRecord) rr[i];
                            res = mx.getTarget().toString();
                            break;
View Full Code Here

    public void testQueryAddressesIpv6() throws SendException {
        new Expectations() {
            {
                lookup.run();
                result =
                        new Record[] { new AAAARecord(HOST6_EXAMPLE_COM_NAME,
                                0, 0, IPV6)

                        };

            }
View Full Code Here

                                    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
                                                        .getByAddress((String) value)));
                                    } else if ("SPF".equals(type)) {
                                        if (value instanceof List) {
                                            records.add(new SPFRecord(hostname,
View Full Code Here

            @Override public void stop() {}
        });

        task.run();

        Record reply = new AAAARecord(new Name("foo.example.com."), DClass.IN,
                1800, InetAddress.getByName("2002:53fe:52a1:7::c9d9"));

        task.answer(reply, false);

        Message result = replies.get(0);
View Full Code Here

        TestingConfiguration conf = new TestingConfiguration("bar", "example.com.", 12345);

        Protocol protocol = new BinaryBackendProtocol();
        Record result = protocol.decode(ipv6message, conf);
        AAAARecord rec = (AAAARecord) result;
        Assert.assertEquals("foo.example.com.", rec.getName().toString());
        Assert.assertEquals("2002:53fe:52a1:7:224:1dff:fe7d:6bef", rec.getAddress().getHostAddress());
        Assert.assertEquals(12345, rec.getTTL());
    }
View Full Code Here

                "\"moniker\": \"bar\" }";

        Protocol protocol = new JSONBackendProtocol();
        Record result = protocol.decode(update.getBytes(), conf);

        AAAARecord rec = (AAAARecord) result;
        Assert.assertEquals("foo.example.com.", rec.getName().toString());
        Assert.assertEquals("2002:53fe:52a1:7:224:1dff:fe7d:6bef", rec.getAddress().getHostAddress());
        Assert.assertEquals(12345, rec.getTTL());
    }
View Full Code Here

        Record record;
        if("ipv4".equals(update.family)) {
            record =  new ARecord(qualified, DClass.IN, ttl, address);
        } else if ("ipv6".equals(update.family)) {
            record = new AAAARecord(qualified, DClass.IN, ttl, address);
        } else {
            throw new ProtocolCodingException("Can't decode " + new String(data));
        }
        return record;
    }
View Full Code Here

        switch (type) {
            case IPV4_UPDATE:
                rec = new ARecord(qualified, DClass.IN, ttl, addr);
                break;
            case IPV6_UPDATE:
                rec = new AAAARecord(qualified, DClass.IN, ttl, addr);
                break;
        }

        return rec;
    }
View Full Code Here

TOP

Related Classes of org.xbill.DNS.AAAARecord

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.