DefaultMutableTreeNode providerNode =
new DefaultMutableTreeNode(providerName);
node.add(providerNode);
// add domain entry to call via domain endpoint factory
ServiceId domainProviderServiceId = new ServiceId();
Class<? extends Domain> domainInterface = provider.getDomainInterface();
domainProviderServiceId.setServiceClass(domainInterface);
domainProviderServiceId.setDomainName(provider.getId());
DefaultMutableTreeNode endPointReferenceNode = new DefaultMutableTreeNode(domainProviderServiceId, false);
providerNode.add(endPointReferenceNode);
// add all corresponding services
List<? extends Domain> domainEndpoints = wiringService.getDomainEndpoints(domainInterface, "*");
for (Domain serviceReference : domainEndpoints) {
String id = serviceReference.getInstanceId();
if (id != null) {
ServiceId serviceId = new ServiceId();
serviceId.setServiceId(id);
serviceId.setServiceClass(domainInterface);
DefaultMutableTreeNode referenceNode = new DefaultMutableTreeNode(serviceId, false);
providerNode.add(referenceNode);
}
}
}