Shuts down the user agent if one exists.
190523
public void close()
    {
        LOGGER.entering(CLASS_NAME, "close");

        synchronized (lock)
        {
            if (serviceAgent != null)
            {
                serviceRegistration.unregister();

                if (LOGGER.isLoggable(Level.FINER)) LOGGER.finer("Service Agent " + this + " stopping...");

                serviceAgent.stop();

                if (LOGGER.isLoggable(Level.FINE)) LOGGER.fine("Service Agent " + this + " stopped successfully");
            }
        }

        LOGGER.exiting(CLASS_NAME, "close");
    }
19055
def shutdown(self, exitcode=0, exitmsg=None):
        '''
        
        '''
        self.action_log_info('Shutting down')
        if hasattr(self, 'minion') and hasattr(self.minion, 'destroy'):
            self.minion.destroy()
        super(Minion, self).shutdown(
            exitcode, ('The Salt {0} is shutdown. {1}'.format(
                self.__class__.__name__, (exitmsg or '')).strip()))
214173
def shutdown(self):
		
		if not self.pyro_ns is None:
			self.pyro_ns.shutdown()
			self.pyro_ns = None
		
		if not self.conf_fn is None:
			os.remove(self.conf_fn)
			self.conf_fn = None
1242372
def ignore_user_agent(user_agent):
    
    if user_agent:
        for ua in MOBI_USER_AGENT_IGNORE_LIST:
            if ua and ua.lower() in user_agent.lower():
                return True
    return False
488154
def stop(vm_):
    '''
    
    '''
    with _get_xapi_session() as xapi:
        vm_uuid = _get_label_uuid(xapi, 'VM', vm_)
        if vm_uuid is False:
            return False
        try:
            xapi.VM.hard_shutdown(vm_uuid)
            return True
        except Exception:
            return False
1064310
public void stop() {

		this.logger.info( "Agent '" + getAgentId() + "' is about to be stopped." );

		// Stop the timer
		if( this.heartBeatTimer != null ) {
			this.heartBeatTimer.cancel();
			this.heartBeatTimer = null;
		}

		// Prevent NPE for successive calls to #stop()
		if( this.messagingClient == null )
			return;

		// Send a last message to the DM
		try {
			if( this.messagingClient.isConnected()) {
				this.messagingClient.sendMessageToTheDm( new MsgNotifMachineDown( this.applicationName, this.scopedInstancePath ));
				this.logger.fine( "Agent " + getAgentId() + " notified the DM it was about to stop." );
			}

		} catch( IOException e ) {
			this.logger.warning( e.getMessage());
			Utils.logException( this.logger, e );
		}

		// Close the connection
		try {
			this.messagingClient.getMessageProcessor().stopProcessor();
			this.messagingClient.getMessageProcessor().interrupt();
			this.messagingClient.closeConnection();

		} catch( IOException e ) {
			this.logger.warning( e.getMessage());
			Utils.logException( this.logger, e );
		}

		this.logger.info( "Agent '" + getAgentId() + "' was stopped." );
	}
1188140
def shutdown(vm_):
    '''
    
    '''
    with _get_xapi_session() as xapi:
        vm_uuid = _get_label_uuid(xapi, 'VM', vm_)
        if vm_uuid is False:
            return False
        try:
            xapi.VM.clean_shutdown(vm_uuid)
            return True
        except Exception:
            return False
1014417
public function shutdown()
    {
        if (!empty($this->ch)) {
            curl_close($this->ch);
            $this->ch = null;
        }
    }
264747
def shutdown_server(self):
        """"""
        self.log.debug('shutdown_server: in')
        if self.ensime and self.toggle_teardown:
            self.ensime.stop()
690048
def shutdown(self):
        """"""
        for ware in self.middleware:
            ware.preshutdown()
            self._shutdown()
            ware.postshutdown()
183097
public void shutdown() {
    this.shouldRun = false;
    this.namespaceSliceDUMap.clear();
    if(this.refreshUsed != null) {
      this.refreshUsed.interrupt();
      try {
        this.refreshUsed.join();
        this.refreshUsed = null;
      } catch (InterruptedException ie) {
      }
    }
  }
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
                }
            }
        }
    }
715423
def close(self):
        """"""

        if hasattr(self, "conn"):
            self.conn.close()
            del self.conn
        if hasattr(self, "user"):
            del self.user
263792
def shutdown(self):
        

        if not self._exited:
            self._exited = True

            # signal task runner to terminate via SIGTERM
            if self._task_runner.is_alive():
                self._task_runner.terminate()

                # if command server is running, then block until
                # task runner completes so it has time to use
                # the command server to clean up root plugins
                if self._command_server.is_alive():
                    if self._task_runner.is_alive():
                        self._task_runner.join()

            _shutdown_pipe(self._pipe)
            self._task.stop()
413543
public void shutdown() {
    if (mbeanName != null) {
      MBeanUtil.unregisterMBean(mbeanName);
    }
    if (versionBeanName != null) {
      MBeanUtil.unregisterMBean(versionBeanName);
    }
    if (namenodeMXBeanName != null) {
      MBeanUtil.unregisterMBean(namenodeMXBeanName);
    }
  }
1282939
def _shutdown(self):
        """"""
        global sconf_global, _ac_config_hs

        if not self.active:
            raise SCons.Errors.UserError("Finish may be called only once!")
        if self.logstream is not None and not dryrun:
            self.logstream.write("\n")
            self.logstream.close()
            self.logstream = None
        # remove the SConfSourceBuilder from the environment
        blds = self.env['BUILDERS']
        del blds['SConfSourceBuilder']
        self.env.Replace( BUILDERS=blds )
        self.active = 0
        sconf_global = None
        if not self.config_h is None:
            _ac_config_hs[self.config_h] = self.config_h_text
        self.env.fs = self.lastEnvFs
1174851
public void shutdown() {
        if (bootstrapped.compareAndSet(true, false)) {
            LOGGER.info("Shutting down Jashing...");

            injector.getInstance(ServiceManager.class).stopAsync().awaitStopped();
            injector.getInstance(JashingServer.class).stopAsync().awaitTerminated();


            /* shutdown method might be called by this hook. So, trying to remove
             * hook which is currently is progress causes error
             */
            if (!shutdownHook.isAlive()) {
                Runtime.getRuntime().removeShutdownHook(shutdownHook);
            }
            LOGGER.info("Jashing has stopped.");
        } else {
            throw new IllegalStateException("Jashing is not bootstrapped");
        }
    }