public static Map<String, String> getAvailableContainers(URL adminServer) {
Assert.notNull(adminServer, "adminServer must not be null");
HashMap<String, String> results = new HashMap<String, String>();
Iterator<DetailedContainerResource> iter = createSpringXDTemplate(adminServer).runtimeOperations().listContainers().iterator();
while (iter.hasNext()) {
DetailedContainerResource container = iter.next();
results.put(container.getAttribute("id"), container.getAttribute("host"));
}
return results;
}