*/
public static int[] calcServices(Cybernode[] cybernodes, Class type) throws RemoteException {
int[] res = new int[cybernodes.length];
for (int i = 0; i < cybernodes.length; i++) {
Cybernode cybernode = cybernodes[i];
ServiceRecord[] records = cybernode.getServiceRecords(ServiceRecord.ACTIVE_SERVICE_RECORD);
for (ServiceRecord record : records) {
ServiceElement element = record.getServiceElement();
ClassBundle[] exportBundles = element.getExportBundles();
for (ClassBundle bundle : exportBundles) {
if (bundle.getClassName().equals(type.getName())) {