Package net.windwards.dnsfrontend.dialog

Examples of net.windwards.dnsfrontend.dialog.Update


    }

    @Test
    public void test() throws Exception {
        final CountDownLatch latch = new CountDownLatch(1);
        final Update update = new Update();
        update.name = "foo";
        update.family = "ipv4";
        update.moniker = "conf";
        update.address = "1.2.3.4";
View Full Code Here


        FakeServer server = new FakeServer();

        Client client = new Client();
        client.connect();

        Update update = new Update();
        update.address = "192.168.0.1";
        update.family = "ipv4";
        update.name = "foo";
        update.moniker = "bar";
View Full Code Here

        frontend.stop();
    }

    @Test
    public void cacheHit() throws Exception {
        Update ipv4 = new Update();
        ipv4.name = "foo";
        ipv4.family = "ipv4";
        ipv4.moniker = "conf";
        ipv4.address = "1.2.3.4";
        client.send(ipv4);

        Update ipv6 = new Update();
        ipv6.name = "foo";
        ipv6.family = "ipv6";
        ipv6.moniker = "conf";
        ipv6.address = "2002:53fe:a000::1";
        client.send(ipv6);
View Full Code Here

        client.setVerbose(true);
        client.addReceiver(new Recipient() {
            Random random = new Random();
            @Override
            public void receive(Request request) {
                Update update = new Update();
                update.name = request.name;
                update.moniker = request.moniker;
                if(request.name.contains("6")) {
                    update.family = "ipv6";
                    update.address = "2002:53fe:52a1:7::" + Integer.toHexString(random.nextInt(65535));
View Full Code Here

    public Record decode(byte[] data, Configuration configuration)
            throws ProtocolCodingException {
        String str = new String(data);

        Message message;
        Update update;
        Name qualified;
        InetAddress address;
        try {
            message = this.mapper.readValue(str, Message.class);
            if(!(message instanceof Update)) return null; // For now
View Full Code Here

TOP

Related Classes of net.windwards.dnsfrontend.dialog.Update

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.