hudson.Plugin.stop()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(95)

本文整理了Java中hudson.Plugin.stop()方法的一些代码示例,展示了Plugin.stop()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Plugin.stop()方法的具体详情如下:
包路径:hudson.Plugin
类名称:Plugin
方法名:stop

Plugin.stop介绍

[英]Called to orderly shut down Hudson.

This is a good opportunity to clean up resources that plugin started. This method will not be invoked if the #start() failed abnormally.
[中]要求有序关闭哈德逊。
这是一个清理插件启动的资源的好机会。如果#start()异常失败,则不会调用此方法。

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Terminates the plugin.
 */
public void stop() {
  Plugin plugin = getPlugin();
  if (plugin != null) {
    try {
      LOGGER.log(Level.FINE, "Stopping {0}", shortName);
      plugin.stop();
    } catch (Throwable t) {
      LOGGER.log(WARNING, "Failed to shut down " + shortName, t);
    }
  } else {
    LOGGER.log(Level.FINE, "Could not find Plugin instance to stop for {0}", shortName);
  }
  // Work around a bug in commons-logging.
  // See http://www.szegedi.org/articles/memleak.html
  LogFactory.release(classLoader);
}

代码示例来源:origin: com.coravy.hudson.plugins.github/github

@Override
public void stop() throws Exception {
  super.stop();
}

代码示例来源:origin: jenkinsci/virtualbox-plugin

@Override
public void stop() throws Exception {
 LOG.log(Level.INFO, "Stopping {0}", getClass().getSimpleName());
 super.stop();
 // close VirtualBox WEB sessions
 VirtualBoxUtils.disconnectAll();
}

代码示例来源:origin: jenkinsci/ircbot-plugin

/**
 * {@inheritDoc}
 */
@Override
public void stop() throws Exception {
  this.imPlugin.stop();
  super.stop();
}

代码示例来源:origin: com.marvelution.jira.plugins/jenkins-jira-plugin

@Override
public void stop() throws Exception {
  self = null;
  LOGGER.info("Removing the previously added filters");
  for (Filter filter : filters) {
    PluginServletFilter.removeFilter(filter);
  }
  save();
  super.stop();
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Terminates the plugin.
 */
public void stop() {
  LOGGER.info("Stopping "+shortName);
  try {
    getPlugin().stop();
  } catch(Throwable t) {
    LOGGER.log(WARNING, "Failed to shut down "+shortName, t);
  }
  // Work around a bug in commons-logging.
  // See http://www.szegedi.org/articles/memleak.html
  LogFactory.release(classLoader);
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Terminates the plugin.
 */
public void stop() {
  LOGGER.info("Stopping "+shortName);
  try {
    getPlugin().stop();
  } catch(Throwable t) {
    LOGGER.log(WARNING, "Failed to shut down "+shortName, t);
  }
  // Work around a bug in commons-logging.
  // See http://www.szegedi.org/articles/memleak.html
  LogFactory.release(classLoader);
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Terminates the plugin.
 */
public void stop() {
  LOGGER.info("Stopping "+shortName);
  try {
    getPlugin().stop();
  } catch(Throwable t) {
    LOGGER.log(WARNING, "Failed to shut down "+shortName, t);
  }
  // Work around a bug in commons-logging.
  // See http://www.szegedi.org/articles/memleak.html
  LogFactory.release(classLoader);
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Terminates the plugin.
 */
public void stop() {
  LOGGER.info("Stopping " + shortName);
  try {
    getPlugin().stop();
  } catch (Throwable t) {
    LOGGER.log(WARNING, "Failed to shut down " + shortName, t);
  }
  // Work around a bug in commons-logging.
  // See http://www.szegedi.org/articles/memleak.html
  LogFactory.release(classLoader);
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Terminates the plugin.
 */
public void stop() {
  Plugin plugin = getPlugin();
  if (plugin != null) {
    try {
      LOGGER.log(Level.FINE, "Stopping {0}", shortName);
      plugin.stop();
    } catch (Throwable t) {
      LOGGER.log(WARNING, "Failed to shut down " + shortName, t);
    }
  } else {
    LOGGER.log(Level.FINE, "Could not find Plugin instance to stop for {0}", shortName);
  }
  // Work around a bug in commons-logging.
  // See http://www.szegedi.org/articles/memleak.html
  LogFactory.release(classLoader);
}

代码示例来源:origin: jenkinsci/scm-sync-configuration-plugin

@Override
public void stop() throws Exception {
  SCMManagerFactory.getInstance().stop();
  super.stop();
}

代码示例来源:origin: jenkinsci/build-failure-analyzer-plugin

@Override
public void stop() throws Exception {
  super.stop();
  ScanOnDemandQueue.shutdown();
  knowledgeBase.stop();
}

代码示例来源:origin: com.marvelution.jira.plugins/hudson-apiv2-plugin

/**
 * {@inheritDoc}
 */
@Override
public void stop() throws Exception {
  super.stop();
  LOGGER.info("Removing the APIv2 Filters");
  for (Filter filter : filters) {
    PluginServletFilter.removeFilter(filter);
  }
  filters.clear();
  LOGGER.info("Storing the Activity Cache");
  XSTREAM.toXML(activitiesCache, new FileOutputStream(getFile(ACTIVITIES_CACHE_FILE)));
  LOGGER.info("Storing the Issue Cache");
  XSTREAM.toXML(issuesCache, new FileOutputStream(getFile(ISSUES_CACHE_FILE)));
  save();
  plugin = null;
}

相关文章