public void emitEvent(int type, Bundle source, ImportReference importRef, Throwable exception) { RemoteServiceAdminEvent event = new RemoteServiceAdminEvent(type, source, importRef, exception); // FIXME why are we casting here? EndpointDescription desc = null; if (importRef instanceof ImportedEndpointImpl) { desc = ((ImportedEndpointImpl) importRef).getImportedEndpoint(true); } else { desc = importRef.getImportedEndpoint(); } if (!m_listeners.isEmpty()) { emitRemoteServiceAdminEvent(event, desc); } if (!m_admins.isEmpty()) { emitEventAdminEvent(createEventAdminEvent(event, desc, exception)); } }
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"); } }