@Override public void stop(final BundleContext bundleContext) throws Exception { bundleContext.removeBundleListener(this); unlockIfReady(); }
@Override public void bundleChanged(final BundleEvent event) { if (event.getType() == BundleEvent.RESOLVED) { register(event.getBundle()); } else if (event.getType() == BundleEvent.UNRESOLVED || event.getType() == BundleEvent.UNINSTALLED) { final Bundle unregisteredBundle = event.getBundle(); lock.writeLock().lock(); try { factories.remove(unregisteredBundle.getBundleId()); if (unregisteredBundle.getSymbolicName().equals(CoreBundleSymbolicNAME)) { bundleContext.removeBundleListener(this); factories.clear(); } } finally { lock.writeLock().unlock(); } } }
@Override public void bundleChanged(final BundleEvent event) { if (event.getType() == BundleEvent.RESOLVED) { register(event.getBundle()); } else if (event.getType() == BundleEvent.UNRESOLVED || event.getType() == BundleEvent.UNINSTALLED) { final Bundle unregisteredBundle = event.getBundle(); lock.writeLock().lock(); try { factories.remove(unregisteredBundle.getBundleId()); if (unregisteredBundle.getSymbolicName().equals(CoreBundleSymbolicNAME)) { bundleContext.removeBundleListener(this); factories.clear(); } } finally { lock.writeLock().unlock(); } } }
@Override public synchronized void stop(BundleContext bundleContext) throws Exception { debug("deactivating"); bundleContext.removeBundleListener(this); while (!bundleWrappers.isEmpty()) { unregister(bundleWrappers.keySet().iterator().next()); } debug("deactivated"); this.bundleContext = null; }
tracked = null; try { context.removeBundleListener(outgoing); } catch (IllegalStateException e) {
@Override public void stop(BundleContext context) throws Exception { context.removeBundleListener(this); }
tracked = null; try { context.removeBundleListener(outgoing);
/** * Removes a bundle listener. * @param listener the listener to remove * @see org.osgi.framework.BundleContext#removeBundleListener(org.osgi.framework.BundleListener) */ public void removeBundleListener(BundleListener listener) { m_bundleContext.removeBundleListener(listener); }
/** * Removes the bundle lister. */ public void dispose() { bundleContext.removeBundleListener( this ); }
@Override public void stop(BundleContext context) { if(serviceLoader!=null) { context.removeBundleListener(serviceLoader); } } }
/** * Stop the execution of the thread and releases the singleton instance. */ public void stop() { running.set(false); bundleContext.removeBundleListener(this); }
protected void deactivate(final ComponentContext ctx) { this.bundleContext.removeBundleListener(this); this.adapterTracker.close(); this.adapterServiceReferences = null; this.adapterBundles = null; }
void destroy() { bundleContext.removeBundleListener(this); servletListenerTracker.close(); executors.shutdown(); // wait for the queued tasks to execute try { executors.awaitTermination(60, TimeUnit.SECONDS); } catch (InterruptedException e) { // ignore } }
/** * Stops the listener. Removes itself from the {@link BundleListener}s. Clears metadata maps and listeners lists. * * @param bundleContext */ public void stop(BundleContext bundleContext) { bundleContext.removeBundleListener(this); providerMetadataMap.clear(); apiMetadataMap.clear(); apiListeners.clear(); providerListeners.clear(); }
/** * Stops the listener. Removes itself from the {@link BundleListener}s. Clears metadata maps and listeners lists. * * @param bundleContext */ public void stop(BundleContext bundleContext) { bundleContext.removeBundleListener(this); providerMetadataMap.clear(); apiMetadataMap.clear(); apiListeners.clear(); providerListeners.clear(); }
@Override protected void doStop() { if (webContainerService != null) { bundleContext.removeBundleListener(webContainerService); webContainerService = null; } super.doStop(); }
@Override public synchronized void stop(BundleContext bundleContext) throws Exception { debug("deactivating"); bundleContext.removeBundleListener(this); while (!bundleWrappers.isEmpty()) { unregister(bundleWrappers.keySet().iterator().next()); } debug("deactivated"); this.bundleContext = null; }
public synchronized void stop(BundleContext bundleContext) throws Exception { debugPrintln("deactivating"); if (bundleContext != null) { bundleContext.removeBundleListener(this); } while (!factories.isEmpty()) { unregister(factories.keySet().iterator().next()); } debugPrintln("deactivated"); this.bundleContext = null; }
/** {@inheritDoc}*/ public void stop(BundleContext context) throws Exception { context.removeBundleListener(cxfBundleListener); cxfBundleListener.shutdown(); workQueues.shutDown(); workQueueServiceRegistration.unregister(); configAdminTracker.close(); ExtensionRegistry.removeExtensions(extensions); }
/** {@inheritDoc}*/ public void stop(BundleContext context) throws Exception { context.removeBundleListener(cxfBundleListener); cxfBundleListener.shutdown(); workQueues.shutDown(); workQueueServiceRegistration.unregister(); configAdminTracker.close(); ExtensionRegistry.removeExtensions(extensions); }