use of org.apache.aries.jmx.codec.ServiceData in project aries by apache.
the class ServiceState method listServices.
private TabularData listServices(String clazz, String filter, Collection<String> serviceTypeItems) throws IOException {
TabularData servicesTable = new TabularDataSupport(SERVICES_TYPE);
ServiceReference[] allServiceReferences = null;
try {
allServiceReferences = bundleContext.getAllServiceReferences(clazz, filter);
} catch (InvalidSyntaxException e) {
throw new IllegalStateException("Failed to retrieve all service references", e);
}
if (allServiceReferences != null) {
for (ServiceReference reference : allServiceReferences) {
servicesTable.put(new ServiceData(reference).toCompositeData(serviceTypeItems));
}
}
return servicesTable;
}
Aggregations