Package javax.jmdns

Examples of javax.jmdns.JmmDNS$Factory


    }

    @Test
    public void testCreateINet() throws IOException {
        System.out.println("Unit Test: testCreateINet()");
        JmmDNS registry = JmmDNS.Factory.getInstance();
        // assertEquals("We did not register on the local host inet:", InetAddress.getLocalHost(), registry.getInterface());
        registry.close();
    }
View Full Code Here


    }

    @Test
    public void testRegisterService() throws IOException, InterruptedException {
        System.out.println("Unit Test: testRegisterService()");
        JmmDNS registry = null;
        try {
            registry = JmmDNS.Factory.getInstance();
            registry.registerService(service);

            Thread.sleep(20000);
            ServiceInfo[] services = registry.list(service.getType());
            assertTrue("We should see the service we just registered: ", services.length > 0);
            assertEquals(service, services[0]);
        } finally {
            if (registry != null) registry.close();
        }
    }
View Full Code Here

TOP

Related Classes of javax.jmdns.JmmDNS$Factory

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.