Stops the service. No new calls will be handled after this is called.
487701
public synchronized void stop() {
		LOG.debug("Stopping server on " + port);
		running = false;
		if (handlers != null) {
			for (int i = 0; i < handlerCount; i++) {
				if (handlers[i] != null) {
					handlers[i].interrupt();
				}
			}
		}
		listener.interrupt();
		listener.doStop();
		responder.interrupt();
		notifyAll();

		// Wait until shut down of handlers is complete
		if (this.handlers != null) {

			while (true) {

				int i = 0;
				for (; i < this.handlerCount; i++) {
					if (this.handlers[i] != null) {
						if (!this.handlers[i].isShutDown()) {
							break;
						}
					}
				}

				if (i < this.handlerCount) {
					try {
						wait(100);
					} catch (InterruptedException e) {
						break;
					}
				} else {
					// exit while loop
					break;
				}
			}
		}

		// Wait until shut down of responder is complete
		while (!this.responder.isShutDown()) {
			try {
				wait(100);
			} catch (InterruptedException e) {
				break;
			}
		}

		// Wait until shut down of listener is complete
		while (!this.listener.isShutDown()) {
			try {
				wait(100);
			} catch (InterruptedException e) {
				break;
			}
		}
	}
657587
public synchronized void stop() throws IOException {
		this.stopped = true;
		if (this.server != null && this.waitingClient) {
			this.server.close();
			this.server = null;
		}
	}
1010359
public void stop() {

    this.stop = true;

    if (this.thread != null && this.thread.isAlive()) {
      this.thread.interrupt();

      for (TrackerClient client : this.clients.values()) {
        client.close();
      }

      try {
        this.thread.join();
      } catch (InterruptedException ie) {
        // Ignore
      }
    }
    this.myPeers.clear();

    this.thread = null;
  }
622402
def stopService(self):
        
        self._service.factory.stopTrying()
        yield self._service.factory.stopFactory()
        yield service.MultiService.stopService(self)
880166
def stop(self):
        
        LOGGER.debug("natsd.Driver.stop")
        for requester in self.requester_registry:
            requester.stop()
        self.requester_registry.clear()

        for service in self.services_registry:
            if service.is_started:
                service.stop()
        self.services_registry.clear()

        return self
931985
public void stop() {
		resume();
		final Thread thread = _thread;
		if (thread != null) {
			thread.interrupt();
			try {
				thread.join();
			} catch (InterruptedException e) {
				Thread.currentThread().interrupt();
			} finally {
				_thread = null;
			}
		}
	}
1218544
def stop(self):
        
        if self._wrapper_telnet_server:
            self._wrapper_telnet_server.close()
            yield from self._wrapper_telnet_server.wait_closed()
        self.status = "stopped"
793358
def stop(self):
        
        self.__end.set()
        if self.__recv_thread:
            self.__recv_thread.join()
            self.__recv_thread = None
        if self.__send_thread:
            self.__send_thread.join()
            self.__send_thread = None
50208
@LifecycleStop
  public void stop()
  {
    giant.lock();

    try {
      tasks.clear();
      taskFutures.clear();
      active = false;
      managerExec.shutdownNow();
      storageSyncExec.shutdownNow();
      managementMayBeNecessary.signalAll();
    }
    finally {
      giant.unlock();
    }
  }
1146560
def _stop(self):
        
        # Running flag down
        self.running = False

        # Unregister the service listener
        self.__context.remove_service_listener(self)

        # Clean up handler factories usages
        with self.__instances_lock:
            for svc_ref in self._handlers_refs:
                self.__context.unget_service(svc_ref)

            self._handlers.clear()
            self._handlers_refs.clear()
104061
public void stop() {
        if (!started) return;
        synchronized (this) {
            try {
                started = false;
                if (processor != null) {
                    processor.stop();
                    processor = null;

                    for (RTPManager rtpMgr : rtpMgrs) {
                        rtpMgr.removeReceiveStreamListener(audioReceiver);
                        rtpMgr.removeSessionListener(audioReceiver);
                        rtpMgr.removeTargets("Session ended.");
                        rtpMgr.dispose();
                    }

                    sendStreams.clear();

                }
            }
            catch (Exception e) {
                LOGGER.log(Level.WARNING, "exception", e);
            }
        }
    }
137876
private void stop() {
		for (int i = 0; i < mDownloadDispatchers.length; i++) {
			if (mDownloadDispatchers[i] != null) {
				mDownloadDispatchers[i].quit();
			}
		}
	}
897202
@Override
    public void stop(){
        if (isStarted.compareAndSet(true,false)) {
            this.syncService.shutdown();
            getCache().clear();
            getMetadataKeyCache().clear();
        }
    }
435963
@Override
    public void stop() {
        System.out.print("Stopping the client...");
        client.disconnect();
        System.out.println("done");
    }
443353
def stop_all(self):
        """"""
        for alias, service in self._service_objects.items():
            if service.is_alive:
                with expects.expect_no_raises(
                        'Failed to stop service "%s".' % alias):
                    service.stop()
876761
public void stop() {
        if (future != null) {
            future.cancel(true);
        }
        if (executor != null) {
            executor.shutdownNow();
        }
    }
1330659
public synchronized void stop() {
        if (listenerThreads.size() > 0) {
            for (MulticastSocketListenerThread thread : listenerThreads) {
                thread.shutdown();
            }
        }

        listenerThreads.clear();
    }