Thread.sleep(5000);
} catch (InterruptedException e1) {
}
ServiceRegistrar[] registrars = discovery.getRegistrars();
for (int x = 0; x < registrars.length; x++) {
ServiceRegistrar registrar = registrars[x];
String registrarInfo = "Registrar: " + registrar.getServiceID();
System.out.println();
System.out.println(registrarInfo);
LOG.debug(registrarInfo);
ServiceTemplate template = new ServiceTemplate(null, null, null);
ServiceMatches matches = registrar.lookup(template, Integer.MAX_VALUE);
ServiceItem[] items = matches.items;
for (int i = 0; i < items.length; i++) {
String serviceInfo = " Service: " + items[i].service;
System.out.println(serviceInfo);
LOG.debug(serviceInfo);