celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; if (serviceTracker_close(activator->remoteServiceAdminTracker) == CELIX_SUCCESS) { serviceTracker_destroy(activator->remoteServiceAdminTracker); } if (serviceTracker_close(activator->endpointListenerTracker) == CELIX_SUCCESS) { serviceTracker_destroy(activator->endpointListenerTracker); } bundleContext_removeServiceListener(context, activator->serviceListener); free(activator->serviceListener); serviceRegistration_unregister(activator->hook); free(activator->hookService); serviceRegistration_unregister(activator->endpointListenerService); free(activator->endpointListener); serviceRegistration_unregister(activator->scopeReg); topologyManager_closeImports(activator->manager); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; serviceRegistration_unregister(activator->dataStoreStatsRegistration); serviceRegistration_unregister(activator->dataStoreRegistration); free(activator->dataStoreService); free(activator->dataStoreStatsService); dataStore_destroy(activator->dataStore); return status; }
celix_status_t serviceRegistry_unregisterServices(service_registry_pt registry, bundle_pt bundle) { array_list_pt regs = NULL; unsigned int i; celixThreadMutex_lock(®istry->mutex); regs = (array_list_pt) hashMap_get(registry->serviceRegistrations, bundle); celixThreadMutex_unlock(®istry->mutex); for (i = 0; (regs != NULL) && i < arrayList_size(regs); i++) { service_registration_pt reg = arrayList_get(regs, i); if (serviceRegistration_isValid(reg)) { serviceRegistration_unregister(reg); } } if (regs != NULL && arrayList_isEmpty(regs)) { celixThreadMutex_lock(®istry->mutex); array_list_pt removed = hashMap_remove(registry->serviceRegistrations, bundle); celixThreadMutex_unlock(®istry->mutex); arrayList_destroy(removed); removed = NULL; } celixThreadMutex_lock(®istry->mutex); hashMap_remove(registry->serviceRegistrations, bundle); celixThreadMutex_unlock(®istry->mutex); return CELIX_SUCCESS; }
static celix_status_t remoteProxyFactory_unregisterProxyService(remote_proxy_factory_pt remote_proxy_factory_ptr, endpoint_description_pt endpointDescription) { celix_status_t status = CELIX_SUCCESS; proxy_instance_pt proxy_instance_ptr = NULL; if (!remote_proxy_factory_ptr || !endpointDescription || !remote_proxy_factory_ptr->proxy_instances || !remote_proxy_factory_ptr->handle) { status = CELIX_ILLEGAL_ARGUMENT; } if (status == CELIX_SUCCESS) { proxy_instance_ptr = hashMap_remove(remote_proxy_factory_ptr->proxy_instances, endpointDescription); if (proxy_instance_ptr == NULL) { status = CELIX_BUNDLE_EXCEPTION; } } if (status == CELIX_SUCCESS) { if (proxy_instance_ptr->registration_ptr) { status = serviceRegistration_unregister(proxy_instance_ptr->registration_ptr); proxy_instance_ptr->properties = NULL; } if (proxy_instance_ptr->service) { status = remote_proxy_factory_ptr->destroy_proxy_service_ptr(remote_proxy_factory_ptr->handle, proxy_instance_ptr->service); } if (proxy_instance_ptr->properties) { properties_destroy(proxy_instance_ptr->properties); } if (proxy_instance_ptr) { free(proxy_instance_ptr); } } return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { struct echoActivator * act = (struct echoActivator *) userData; serviceRegistration_unregister(act->reg); act->reg = NULL; return CELIX_SUCCESS; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status; struct disc_mock_activator * act = userData; status = serviceRegistration_unregister(act->reg); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; serviceRegistration_unregister(activator->calculatorReg); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; bundle_activator_pt activator = (bundle_activator_pt) userData; printf("PRODUCER: Stopping bundle...\n"); serviceTracker_close(activator->tracker); serviceTracker_destroy(activator->tracker); serviceRegistration_unregister(activator->producerStatsRegistration); serviceRegistration_unregister(activator->producerRegistration); producer_stop(activator->producer); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context __attribute__((unused))) { struct activator * activator = userData; serviceTracker_close(activator->tracker); serviceRegistration_unregister(activator->reg); return CELIX_SUCCESS; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator * act = userData; status = serviceRegistration_unregister(act->reg); status = CELIX_DO_IF(status, serviceTracker_close(act->tracker)); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context __attribute__((unused))) { celix_status_t status = CELIX_SUCCESS; dependency_activator_base_pt dependency_activator = (dependency_activator_base_pt) userData; // Remove the service status = serviceRegistration_unregister(dependency_activator->reg); dependencyManager_removeAllComponents(dependency_activator->manager); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activatorData * data = (struct activatorData *) userData; serviceRegistration_unregister(data->reg); free(data->pub); free(data->ps); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; serviceRegistration_unregister(activator->endpointServiceRegistration); calculatorEndpoint_destroy(&activator->endpointService->endpoint); free(activator->endpointService); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; remoteServiceAdmin_stop(activator->admin); serviceRegistration_unregister(activator->registration); activator->registration = NULL; return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; status = serviceTracker_close(activator->endpointListenerTracker); status = serviceRegistration_unregister(activator->endpointListenerService); status = discovery_stop(activator->discovery); return status; }
celix_status_t importRegistration_stop(import_registration_pt import) { celix_status_t status = CELIX_SUCCESS; if (import->factoryReg != NULL) { serviceRegistration_unregister(import->factoryReg); import->factoryReg = NULL; } importRegistration_clearProxies(import); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { printf("CONSUMING_DRIVER: stopping bundle\n"); celix_status_t status = CELIX_SUCCESS; consuming_driver_bundle_instance_pt bi = userData; if (bi->registration != NULL) { serviceRegistration_unregister(bi->registration); printf("CONSUMING_DRIVER: unregistered driver service\n"); } return status; }
celix_status_t calculatorProxy_unregisterProxyService(void* proxyFactoryService, endpoint_description_pt endpointDescription) { celix_status_t status = CELIX_SUCCESS; remote_proxy_factory_service_pt calculatorProxyFactoryService = (remote_proxy_factory_service_pt) proxyFactoryService; service_registration_pt proxyReg = hashMap_get(calculatorProxyFactoryService->proxy_registrations, endpointDescription); if (proxyReg != NULL) { serviceRegistration_unregister(proxyReg); } return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t result = CELIX_SUCCESS; struct web_console_activator *wca = (struct web_console_activator*) userData; serviceRegistration_unregister(wca->reg); if(wca->webConsole) { free(wca->webConsole); wca->webConsole = NULL; } else { result = CELIX_START_ERROR; } return result; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; struct activator *activator = userData; status += serviceTracker_close(activator->serializerTracker); status += serviceRegistration_unregister(activator->registration); activator->registration = NULL; free(activator->adminService); activator->adminService = NULL; return status; }
static celix_status_t refiningDriver_stopDevice(refining_driver_device_pt device) { printf("REFINING_DRIVER: stopping device, parent device is unregistered\n"); celix_status_t status = CELIX_SUCCESS; if (device->deviceRegistration != NULL) { status = serviceRegistration_unregister(device->deviceRegistration); if (status == CELIX_SUCCESS) { printf("unregistered refining device\n"); } } arrayList_removeElement(device->driver->devices, device); return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { celix_status_t status = CELIX_SUCCESS; bundle_activator_pt activator = userData; printf("PROCESSOR: Stopping bundle...\n"); serviceTracker_close(activator->queueTracker); serviceTracker_close(activator->dataStoreTracker); serviceTracker_destroy(activator->queueTracker); serviceTracker_destroy(activator->dataStoreTracker); serviceRegistration_unregister(activator->processorStatsRegistration); processor_stop(activator->processor); free(activator->processorStatsService); processor_destroy(activator->processor); return status; }
celix_status_t wiringAdmin_removeImportedWiringEndpoint(wiring_admin_pt admin, wiring_endpoint_description_pt wEndpointDescription) { celix_status_t status; celixThreadMutex_lock(&admin->importedWiringEndpointLock); char* wireId = properties_get(wEndpointDescription->properties, WIRING_ENDPOINT_DESCRIPTION_WIRE_ID_KEY); printf("%s: remove Wiring Endpoint w/ wireId %s\n", TAG, wireId); wiring_send_service_pt wiringSendService = hashMap_remove(admin->wiringSendServices, wEndpointDescription); service_registration_pt wiringSendRegistration = hashMap_remove(admin->wiringSendRegistrations, wEndpointDescription); status = serviceRegistration_unregister(wiringSendRegistration); if (status == CELIX_SUCCESS) { free(wiringSendService); } celixThreadMutex_unlock(&admin->importedWiringEndpointLock); return status; }
celix_status_t remoteProxyFactory_unregister(remote_proxy_factory_pt remote_proxy_factory_ptr) { celix_status_t status = CELIX_SUCCESS; if (!remote_proxy_factory_ptr) { status = CELIX_ILLEGAL_ARGUMENT; } // #TODO Remove proxy registrations if (status == CELIX_SUCCESS) { if (remote_proxy_factory_ptr->registration) { status = serviceRegistration_unregister(remote_proxy_factory_ptr->registration); remote_proxy_factory_ptr->properties = NULL; } if (remote_proxy_factory_ptr->properties) { properties_destroy(remote_proxy_factory_ptr->properties); } if (remote_proxy_factory_ptr->remote_proxy_factory_service_ptr) { free(remote_proxy_factory_ptr->remote_proxy_factory_service_ptr); } } return status; }
celix_status_t bundleActivator_stop(void * userData, bundle_context_pt context) { bundle_instance_pt bi = (bundle_instance_pt) userData; serviceRegistration_unregister(bi->reg); return CELIX_SUCCESS; }