/** * Called by Dependency Manager upon destruction of this component. */ public void destroy( final Component aComponent ) throws Exception { if ( this.serviceComponent != null ) { this.manager.remove( this.serviceComponent ); } }
/** * Called when the script is executed and this service needs to be removed. */ void complete() { m_dm.remove(m_component); }
@Override public void destroy(BundleContext context, DependencyManager manager) throws Exception { manager.remove(accessManager); } }
private void unregisterConfigurationService() { Component component = m_configurationComponent; m_configurationComponent = null; if (component != null) { m_dependencyManager.remove(component); } }
private void unregisterConfigurationService() { Component component = m_configuration; m_configuration = null; if (component != null) { m_manager.remove(component); } }
@Override public void destroy() throws Exception { if (_upgradeStepServiceRegistration != null) { _upgradeStepServiceRegistration.unregister(); } if (_component != null) { _dependencyManager.remove(_component); } }
public void deleted(String pid) { Component service = m_services.remove(pid); if (service != null) { m_manager.remove(service); } }
/** * @see org.osgi.service.cm.ManagedServiceFactory#deleted(java.lang.String) */ public void deleted(String pid) { Component component; synchronized (m_instances) { component = m_instances.remove(pid); } if (component != null) { m_manager.remove(component); } }
/** * Removes all components and their dependencies. */ public void clear() { for (Component component : m_components.keySet()) { remove(component); } m_components.clear(); }
public void removed(URL resource) { Component newService = m_services.remove(resource); if (newService == null) { throw new IllegalStateException("Service should not be null here."); } m_manager.remove(newService); }
public void removed(Bundle bundle) { Component newService; newService = (Component) m_services.remove(bundle); if (newService == null) { throw new IllegalStateException("Service should not be null here."); } m_manager.remove(newService); }
private void doClear() { for (Object service : m_services.values()) { if (service instanceof Component) { m_dm.remove((Component) service); } } m_services.clear(); }
public void removed(ServiceReference<?> ref, Object service) { Component newService; newService = (Component) m_services.remove(ref); if (newService == null) { throw new IllegalStateException("Service should not be null here."); } m_manager.remove(newService); }
public void stop() { for (Component component : m_services.values()) { m_manager.remove(component); } m_services.clear(); }
private void cleanupListeners() { Component[] components; synchronized (m_eventHandlers) { components = m_eventHandlers.toArray(new Component[m_eventHandlers.size()]); m_eventHandlers.clear(); } for (Component component : components) { m_manager.remove(component); } }
/** * Removes a service from the dependency manager. Before the service is removed * it is stopped first. * * @param service the service to remove */ public void remove(Service service) { org.apache.felix.dependencymanager.impl.ServiceImpl impl = (org.apache.felix.dependencymanager.impl.ServiceImpl)service; ((org.apache.felix.dm.DependencyManager) m_delegate).remove(impl.getDelegate()); }
public void deleted(String pid) { Component log = m_instances.remove(pid); if (log != null) { m_manager.remove(log); delete(new File(m_context.getDataFile(""), pid)); } }
public synchronized void deleted(String pid) { Component log = (Component) m_instances.remove(pid); if (log != null) { m_manager.remove(log); delete(new File(m_context.getDataFile(""), pid)); } }