Examples of unRegisterService()


Examples of javax.jmdns.JmDNS.unregisterService()

            ServiceInfo[] services = registry.list(service.getType());
            assertEquals("We should see the service we just registered: ", 1, services.length);
            assertEquals(service, services[0]);

            // now unregister and make sure it's gone
            registry.unregisterService(services[0]);

            // According to the spec the record disappears from the cache 1s after it has been unregistered
            // without sleeping for a while, the service would not be unregistered fully
            Thread.sleep(1500);
View Full Code Here

Examples of javax.jmdns.JmDNS.unregisterService()

            ServiceInfo[] services = registry.list(service.getType());
            assertEquals("We should see the service we just registered: ", 1, services.length);
            assertEquals(service, services[0]);

            // now unregister and make sure it's gone
            registry.unregisterService(services[0]);

            // According to the spec the record disappears from the cache 1s after it has been unregistered
            // without sleeping for a while, the service would not be unregistered fully
            Thread.sleep(1500);
View Full Code Here

Examples of javax.jmdns.JmDNS.unregisterService()

            // with toLowerCase
            ServiceInfo[] services = registry.list(service.getType().toLowerCase());
            assertEquals("We should see the service we just registered: ", 1, services.length);
            assertEquals(service, services[0]);
            // now unregister and make sure it's gone
            registry.unregisterService(services[0]);
            // According to the spec the record disappears from the cache 1s after it has been unregistered
            // without sleeping for a while, the service would not be unregistered fully
            Thread.sleep(1500);
            services = registry.list(service.getType().toLowerCase());
            assertTrue("We should not see the service we just unregistered: ", services == null || services.length == 0);
View Full Code Here

Examples of javax.jmdns.JmDNS.unregisterService()

            // without toLowerCase
            ServiceInfo[] services = registry.list(service.getType());
            assertEquals("We should see the service we just registered: ", 1, services.length);
            assertEquals(service, services[0]);
            // now unregister and make sure it's gone
            registry.unregisterService(services[0]);
            // According to the spec the record disappears from the cache 1s after it has been unregistered
            // without sleeping for a while, the service would not be unregistered fully
            Thread.sleep(1500);
            services = registry.list(service.getType());
            assertTrue("We should not see the service we just unregistered: ", services == null || services.length == 0);
View Full Code Here

Examples of javax.jmdns.JmDNS.unregisterService()

                    output.write(reply);
                    output.flush();

                    System.out.println("someone paired with me!");

                    jmdns.unregisterService(pairservice);
                } finally {
                    if (output != null) {
                        output.close();
                    }
View Full Code Here

Examples of javax.jmdns.JmDNS.unregisterService()

            // int b;
            while ((b = System.in.read()) != -1 && (char) b != 'q') {
                /* Stub */
            }
            System.out.println("Closing JmDNS...");
            jmdns.unregisterService(pairservice);
            jmdns.unregisterAllServices();
            jmdns.close();
            System.out.println("Done!");
            System.exit(0);
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.hadoop.yarn.lib.ZKClient.unregisterService()

  }

  private void test(String testClient) throws Exception {
    ZKClient client = new ZKClient(hostPort);
    client.registerService("/nodemanager", "hostPort");
    client.unregisterService("/nodemanager");
  }

}
View Full Code Here

Examples of org.apache.hadoop.yarn.lib.ZKClient.unregisterService()

  }

  private void test(String testClient) throws Exception {
    ZKClient client = new ZKClient(hostPort);
    client.registerService("/nodemanager", "hostPort");
    client.unregisterService("/nodemanager");
  }

}
View Full Code Here

Examples of org.apache.hadoop.yarn.lib.ZKClient.unregisterService()

  }

  private void test(String testClient) throws Exception {
    ZKClient client = new ZKClient(hostPort);
    client.registerService("/nodemanager", "hostPort");
    client.unregisterService("/nodemanager");
  }

}
View Full Code Here

Examples of org.apache.tuscany.sca.host.rmi.DefaultRMIHost.unregisterService()

    }

    public void testRegisterService1() throws RMIHostRuntimeException, RMIHostException {
        DefaultRMIHost host = new DefaultRMIHost();
        host.registerService("foo1", new MockRemote());
        host.unregisterService("foo1");
    }

    public void testRegisterService2() throws RMIHostRuntimeException, RMIHostException {
        DefaultRMIHost host = new DefaultRMIHost();
        host.registerService("bar1", 9999, new MockRemote());
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.