ExportRegistrationHolder(ExportRegistration registration) { this.registration = registration; this.reference = registration.getExportReference(); this.endpoint = this.reference.getExportedEndpoint(); }
public List<EndpointDescription> getAllEndpoints() { List<EndpointDescription> endpoints = new ArrayList<>(); for (ServiceReference<?> sref : exportsMap.keySet()) { Collection<ExportRegistrationHolder> exports = exportsMap.get(sref); for (ExportRegistrationHolder reg : exports) { ExportReference exportRef = reg.getRegistration().getExportReference(); if (exportRef != null) { endpoints.add(exportRef.getExportedEndpoint()); } } } return endpoints; } }
public synchronized void addService(ServiceReference<?> sref, Collection<ExportRegistration> exports) { List<ExportRegistrationHolder> holderList = new ArrayList<ExportRegistrationHolder>(exports.size()); exportsMap.put(sref, holderList); for (ExportRegistration reg : exports) { ExportRegistrationHolder holder = new ExportRegistrationHolder(reg); holderList.add(holder); ExportReference exportReference = reg.getExportReference(); if (exportReference != null) { EndpointDescription endpoint = exportReference.getExportedEndpoint(); EndpointEvent event = new EndpointEvent(EndpointEvent.ADDED, endpoint); notifier.sendEvent(event); } } }
EndpointDescription endpoint = reg.getExportReference().getExportedEndpoint(); LOG.info("TopologyManager: export succeeded for {}, endpoint {}, rsa {}", sref, endpoint, rsa.getClass().getName()); } else {
public void emitEvent(int type, Bundle source, ExportReference exportRef, Throwable exception) { RemoteServiceAdminEvent event = new RemoteServiceAdminEvent(type, source, exportRef, exception); // FIXME why are we casting here? EndpointDescription desc = null; if (exportRef instanceof ExportedEndpointImpl) { desc = ((ExportedEndpointImpl) exportRef).getExportedEndpoint(true); } else { desc = exportRef.getExportedEndpoint(); } if (!m_listeners.isEmpty()) { emitRemoteServiceAdminEvent(event, desc); } else { logDebug("No RSA listeners"); } if (!m_admins.isEmpty()) { emitEventAdminEvent(createEventAdminEvent(event, desc, exception)); } else { logDebug("No EventAdmins"); } }