/*
(non-Javadoc)
@see net.timewalker.ffmq4.cluster.bridge.JMSBridgeMBean#stop()
484019
@Override
	public synchronized void stop()
	{
		if (!started)
			return;
		
		bridgeThread.pleaseStop();
		try
		{
			bridgeThread.join();
		}
		catch (InterruptedException e)
		{
			log.error("Wait for bridge thread completion was interrupted");
		}
		finally
		{
			bridgeThread = null;
		}
		
		log.info("["+bridgeDefinition.getName()+"] JMS bridge stopped.");
		started = false;
	}
958443
public synchronized void stop() {
        if (state != State.STOPPED) {
            nanoTimeStop = System.nanoTime();
            state = State.STOPPED;
        }
    }
986203
@Override
	public final void stop() throws JMSException
    {
    	externalAccessLock.readLock().lock();
    	try
		{
	        checkNotClosed();
	        if (!started)
	            return;
	        started = false;
	        
	        // Wait for running deliveries to complete ...
	        waitForDeliverySync();
		}
    	finally
    	{
    		externalAccessLock.readLock().unlock();
    	}
    }
83288
public synchronized void stop() {

        if (m_thread != null) {
            long timeBeforeShutdownWasCalled = System.currentTimeMillis();
            JLANServer.shutdownServer(new String[] {});
            while (m_thread.isAlive()
                && ((System.currentTimeMillis() - timeBeforeShutdownWasCalled) < MAX_SHUTDOWN_WAIT_MILLIS)) {
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    // ignore
                }
            }
        }

    }
1150399
@Override
    public void stop(long millisec) throws ChannelException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Stop channel: " + this + " time=" + millisec);
        }
        if (0L < millisec) {
            this.quiescing = true;
            if (0 == this.activeConnections.get()) {
                // no current connections, notify the final stop can happen now
                signalNoConnections();
            }
        } else {
            this.quiescing = false;
            stop0Called = true;
        }
    }
88273
@Override
    public void stop() {
        // Run jersey shutdown lifecycle
        if (container != null) {
            container.stop();
            container = null;
        }
        // Destroy the jersey service locator
        if (jerseyHandler != null && jerseyHandler.getDelegate() != null) {
            ServiceLocatorFactory.getInstance().destroy(jerseyHandler.getDelegate().getServiceLocator());
            jerseyHandler = null;
        }
        if (server != null) {
            server.close();
            server = null;
        }
    }
120152
@Override
    public void stop()
                    throws SISessionUnavailableException, SISessionDroppedException,
                    SIResourceException, SIConnectionLostException,
                    SIErrorException
    {
        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConsumerSession.tc.isEntryEnabled())
            SibTr.entry(CoreSPIConsumerSession.tc, "stop", this);

        //stop the LCP
        _localConsumerPoint.stop();

        if (TraceComponent.isAnyTracingEnabled() && CoreSPIConsumerSession.tc.isEntryEnabled())
            SibTr.exit(CoreSPIConsumerSession.tc, "stop");
    }
697556
public void stop() {
		
		if (!this.running.compareAndSet(true, false)) {
			return;
		}

		// wake up all connections
		synchronized (this.connections) {
			for (final Connection conn : this.connections.values()) {
				conn.interrupt();
			}
		}

		// wait until all connections are closed
		while (!this.connections.isEmpty()) {
			try {
				Thread.sleep(100);
			} catch (InterruptedException e) {
			}
		}
	}
1139572
public void stop() {
        if (msgRouter != null) {
            TrConfigurator.unsetMessageRouter(msgRouter);
        }
        if (configListener != null) {
            configListener.unregister();
        }
    }
1242721
@Override
	public synchronized void stop() {
		this.logger.d("Stopping...");
		this.getGame().onStop();
		this.running = false;
		if (this.hasFrame) this.frame.dispose();
		try {
			this.thread.join(3000);
		} catch (InterruptedException e) {
			this.logger.e("Error exiting!", e);
			System.exit(-1);
		}
		this.logger.d("Stopped.");
		System.exit(0);
	}
710919
@Override
   public final void stop() {
      // Trying to stop() from FAILED is valid, but may not work
      boolean failed;

      synchronized (this) {
         try {
            while (state == ComponentStatus.STOPPING) {
               wait();
            }
            if (!state.stopAllowed()) {
               getLog().debugf("Ignoring call to stop() as current state is %s", state);
               return;
            }

            failed = state == ComponentStatus.FAILED;
            state = ComponentStatus.STOPPING;
         } catch (InterruptedException e) {
            throw new CacheException("Interrupted waiting for the component registry to stop");
         }
      }

      preStop();

      try {
         internalStop();

         postStop();
      } catch (Throwable t) {
         if (failed) {
            getLog().failedToCallStopAfterFailure(t);
         } else {
            handleLifecycleTransitionFailure(t);
         }
      } finally {
         synchronized (this) {
            state = ComponentStatus.TERMINATED;
         }
      }
   }
449571
@Override
    public void stop() throws Exception {
        log.info("Stopping {}...", name);
        submitBuffer(true);
        if (coreContainer != null) {
            coreContainer.shutdown();
        }
        if (consumer != null) {
            try {
                consumer.close();
            } catch (JMSException jmse) {
                log.warn("Failed to close consumer: {}", jmse.getMessage());
                throw jmse;
            }
        }
        if (session != null) {
            try {
                session.close();
            } catch (JMSException jmse) {
                log.warn("Failed to close consumer session: {}", jmse);
            }
        }
        if (connection != null) {
            try {
                connection.close();
            } catch (JMSException jmse) {
                log.warn("Failed to close connection: {}", jmse);
            }
        }
        timer.cancel();
    }
290737
@Override
    public void stop() {
        running = false;
        threadStarter.interrupt();
        for (DynamicThread thread : threads) {
            thread.interrupt();
            thread.interruptOSThread();
        }
    }
1340176
public void stop() {
    if (server == null) {
      return;
    }

    logger.fine("Shutting down STP connection listener");
    monitor.remove(server);
    try {
      server.close();
    } catch (IOException e) {
      // ignored
    } finally {
      server = null;
    }
  }
641536
public void stop() throws IOException {
		synchronized (this.monitor) {
			if (this.serverThread != null) {
				this.serverThread.close();
				try {
					this.serverThread.join(2000);
				}
				catch (InterruptedException ex) {
					Thread.currentThread().interrupt();
				}
				this.serverThread = null;
			}
		}
	}
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);
        }
    }
1252521
@Override
  public void stop() {
    stopped_ = true;

    // Stop queuing connect attempts asap
    stopListening();

    if (acceptThread != null) {
      acceptThread.wakeupSelector();
    }
    if (selectorThreads != null) {
      for (SelectorThread thread : selectorThreads) {
        if (thread != null)
          thread.wakeupSelector();
      }
    }
  }