Package net.windwards.dnsfrontend.api

Examples of net.windwards.dnsfrontend.api.Protocol.decode()


        };

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

        Protocol protocol = new BinaryBackendProtocol();
        Record result = protocol.decode(ipv4message, conf);
        ARecord rec = (ARecord) result;
        Assert.assertEquals("foo.example.com.", rec.getName().toString());
        Assert.assertEquals("192.168.0.1", rec.getAddress().getHostAddress());
        Assert.assertEquals(12345, rec.getTTL());
    }
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

                "\"address\": \"192.168.0.1\", " +
                "\"family\": \"ipv4\", " +
                "\"moniker\": \"bar\" }";

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

        ARecord rec = (ARecord) result;
        Assert.assertEquals("foo.example.com.", rec.getName().toString());
        Assert.assertEquals("192.168.0.1", rec.getAddress().getHostAddress());
        Assert.assertEquals(12345, rec.getTTL());
View Full Code Here

                "\"address\": \"2002:53fe:52a1:7:224:1dff:fe7d:6bef\", " +
                "\"family\": \"ipv6\", " +
                "\"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

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.