Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
Map<String, EndpointDescription> remoteEndpoints = clusterManager.getMap(Constants.REMOTE_ENDPOINTS);
if (remoteEndpoints != null && !remoteEndpoints.isEmpty()) {
System.out.println(String.format(LIST_FORMAT, "Service Class", "Provider Node"));
for (Map.Entry<String, EndpointDescription> entry : remoteEndpoints.entrySet()) {
EndpointDescription endpointDescription = entry.getValue();
String serviceClass = endpointDescription.getServiceClass();
Set<Node> nodes = endpointDescription.getNodes();
for (Node node : nodes) {
System.out.println(String.format(LIST_FORMAT, serviceClass, node.getId()));
serviceClass = "";
}
}