+\r
+ private void testService(String hostname, Services service)\r
+ throws IOException {\r
+ RegistryWS registry = connectToRegistry(hostname);\r
+ if (registry != null) {\r
+ String message = registry.testService(service);\r
+ System.out.println("Service " + service + " testing results: ");\r
+ System.out.println(message);\r
+ ((Closeable) registry).close();\r
+ }\r
+ }\r
+\r
+ private void listServices(String hostname) throws IOException {\r
+ RegistryWS registry = connectToRegistry(hostname);\r
+ if (registry != null) {\r
+ Set<Services> services = registry.getSupportedServices();\r
+ System.out.println("Supported services are: "\r
+ + Services.toString(services));\r
+ ((Closeable) registry).close();\r
+ } else {\r
+ System.out.println("Failed to connect to the registry! ");\r
+ }\r
+ }\r
+\r