Stop this service and free any allocated resources when the owning bundle
is being stopped.
171754
void stop() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Stopping the HPEL managed service");
        }
        // disconnect from the config admin
        this.configRef.unregister();
    }
859834
def stop(self):
        
        if self._state != Bundle.ACTIVE:
            # Invalid state
            return

        exception = None
        with self._lock:
            # Store the bundle current state
            previous_state = self._state

            # Stopping...
            self._state = Bundle.STOPPING
            self._fire_bundle_event(BundleEvent.STOPPING)

            # Call the activator, if any
            stopper = self.__get_activator_method("stop")
            if stopper is not None:
                try:
                    # Call the start method
                    stopper(self.__context)
                except (FrameworkException, BundleException) as ex:
                    # Restore previous state
                    self._state = previous_state

                    # Re-raise directly Pelix exceptions
                    _logger.exception(
                        "Pelix error raised by %s while stopping", self.__name
                    )
                    exception = ex
                except Exception as ex:
                    _logger.exception(
                        "Error raised by %s while stopping", self.__name
                    )
                    # Store the exception (raised after service clean up)
                    exception = BundleException(ex)

            # Hide remaining services
            self.__framework._hide_bundle_services(self)

            # Intermediate bundle event : activator should have cleaned up
            # everything, but some element could stay (iPOPO components, ...)
            self._fire_bundle_event(BundleEvent.STOPPING_PRECLEAN)

            # Remove remaining services (the hard way)
            self.__unregister_services()

            # Cleanup service usages
            self.__framework._unget_used_services(self)

            # Bundle is now stopped and all its services have been unregistered
            self._state = Bundle.RESOLVED
            self._fire_bundle_event(BundleEvent.STOPPED)

        # Raise the exception, if any
        # pylint: disable=E0702
        # Pylint seems to miss the "is not None" check below
        if exception is not None:
            raise exception
512556
@Override
	public void stop(BundleContext context) throws Exception {
		final String sourceMethod = "stop"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(Activator.class.getName(), sourceMethod, new Object[]{context});
		}
		super.stop(context);
		// Shutdown the aggregator instances
		ServiceReference<?>[] refs = context.getServiceReferences(IAggregator.class.getName(), null);
		if (refs != null) {
			for (ServiceReference<?> ref : refs) {
				AggregatorImpl aggr = (AggregatorImpl)context.getService(ref);
				if (aggr != null) {
					try {
						aggr.shutdown();
					} catch (Exception e) {
						if (log.isLoggable(Level.SEVERE)) {
							log.log(Level.SEVERE, e.getMessage(), e);
						}
					}
				}
			}
		}

		for (ServiceRegistration<?> reg : serviceRegistrations) {
			reg.unregister();
		}
		if (executors != null) {
			executors.shutdown();
		}
		this.executors = null;
		Activator.context = null;

		if (isTraceLogging) {
			log.exiting(Activator.class.getName(), sourceMethod);
		}
	}
272569
public void free()
    {
        if (m_pTable != null)
        {
            PDatabase pDatabase = m_pTable.getPDatabase();
            m_pTable.removePTableOwner(this, true);
            pDatabase.removePDatabaseOwner(this, true);
        }
        m_pTable = null;
        super.free();
    }
316354
async def stop(self):
        
        if self._association_state != self.State.CLOSED:
            await self._abort()
        self.__transport._unregister_data_receiver(self)
        self._set_state(self.State.CLOSED)
676451
public synchronized void stop() {
        if (isRunning()) {
            running.set(false);
            DeviceFinder.getInstance().removeDeviceAnnouncementListener(announcementListener);
            dbServerPorts.clear();
            for (Client client : openClients.values()) {
                try {
                    client.close();
                } catch (Exception e) {
                    logger.warn("Problem closing " + client + " when stopping", e);
                }
            }
            openClients.clear();
            useCounts.clear();
            deliverLifecycleAnnouncement(logger, false);
        }
    }
721883
def stop_serving(self):
        
        if self.container:
            self.container.down()
            self.container.join()
            self._cleanup()
        # for serving we can delete everything in the container root.
        _delete_tree(self.container_root)
1315961
def stop(self):
    
    with self.lock:
      self.halting = True
      self.go.clear()
181608
void stop() {
        ScheduledFuture<?> future = this.rollupFuture.getAndSet(null);
        if (future != null && !future.isDone() && !future.isCancelled()) {
            // Stop running the scheduled job, letting any currently running rollup finish ...
            future.cancel(false);
        }
    }
846338
def stop(self, io_handler, bundle_id, *bundles_ids):
        
        for bid in (bundle_id,) + bundles_ids:
            bundle = self.__get_bundle(io_handler, bid)
            if bundle is not None:
                io_handler.write_line(
                    "Stopping bundle {0} ({1})...",
                    bid,
                    bundle.get_symbolic_name(),
                )
                bundle.stop()
            else:
                return False

        return None
95056
public void stop() {
        if (discoveryMulticastResponder != null) {
            discoveryMulticastResponder.stop();
            discoveryMulticastResponder = null;
        }
        backendManager.destroy();
        backendManager = null;
        requestHandler = null;
    }
1162235
public void free()
    {
        if (m_bKeepAlive)
        {
            m_bKeepAlive = false; // Don't stay alive
            m_bThreadSuspended = false;   // Unsuspend this puppy
            try {
                this.notify();          // If you're waiting, continue (and the thread will die)
            } catch (IllegalMonitorStateException ex) {
                // Ignore
            }
        }
        super.free();
    }
1056611
public void stop() {
        if (started) {
            stopped();
        }
        started = false;
        if (worker != null) {
            worker.cancel();
        }
        
        if(mediaSink!=null) {
        	mediaSink.stop();
        }
        	
        timestamp = 0;
    }
430745
public void stop() {
        if (mCacheDispatcher != null) {
            mCacheDispatcher.quit();
        }
        for (int i = 0; i < mDispatchers.length; i++) {
            if (mDispatchers[i] != null) {
                mDispatchers[i].quit();
            }
        }
    }
27017
public void stop() {
        synchronized (this.startStopMonitor) {
            doStop();

            // If we registered a JVM shutdown hook, we don't need it anymore now:
            // We've already explicitly closed the context.
            if (this.shutdownHook != null) {
                try {
                    Runtime.getRuntime().removeShutdownHook(this.shutdownHook);
                } catch (final IllegalStateException ex) {
                    // ignore - VM is already shutting down
                }
            }
        }
    }
1048006
def stop(self):
		
		if WAppsGlobals.log is not None and WLogApp.__log_handler__ is not None:
			WAppsGlobals.log.removeHandler(WLogApp.__log_handler__)

		WLogApp.__log_handler__ = None
		WAppsGlobals.log = None
861321
public void dispose() {
        if (_cacheFile != null && _dirty) {
            PrintStream out = null;
            try {
                File parent = _cacheFile.getParentFile();
                if (parent.isDirectory() || parent.mkdirs()) {
                    out = new PrintStream(_cacheFile);
                    for (List<Resource> bundleInfoList : _cacheBySymbolicName.values()) {
                        for (Resource bundleInfo : bundleInfoList) {
                            out.println(bundleInfo);
                        }
                    }
                }
            } catch (IOException e) {
            } finally {
                Utils.tryToClose(out);
            }
        }
        _bundleLocations.clear();
        _cacheBySymbolicName.clear();
    }