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

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

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

Plugin.setServletContext介绍

[英]Called when a plugin is loaded to make the ServletContext object available to a plugin. This object allows plugins to talk to the surrounding environment.

The default implementation is no-op.
[中]

代码示例

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

plugin.setServletContext(pluginManager.context);
  startPlugin(wrapper);
} catch(Throwable t) {

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

/**
 * Configures and starts the {@link hudson.Plugin} instance.
 */
private void start(final PluginWrapper plugin) throws Exception {
  assert plugin != null;
  if (log.isDebugEnabled()) {
    log.debug("Starting plugin: {}", plugin.getShortName());
  }
  Plugin instance = plugin.getPlugin();
  instance.setServletContext(Hudson.getInstance().servletContext);
  instance.start();
}

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

/**
 * Configures and starts the {@link hudson.Plugin} instance.
 */
private void start(final PluginWrapper plugin) throws Exception {
  assert plugin != null;
  if (log.isDebugEnabled()) {
    log.debug("Starting plugin: {}", plugin.getShortName());
  }
  Plugin instance = plugin.getPlugin();
  instance.setServletContext(Hudson.getInstance().servletContext);
  instance.start();
}

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

plugin.setServletContext(pluginManager.context);
  startPlugin(wrapper);
} catch(Throwable t) {

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

plugin.setServletContext(pluginManager.context);
  startPlugin(wrapper);
} catch (Throwable t) {

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

plugin.setServletContext(pluginManager.context);
  startPlugin(wrapper);
} catch(Throwable t) {

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

plugin.setServletContext(pluginManager.context);
  startPlugin(wrapper);
} catch(Throwable t) {

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

plugin.setServletContext(pluginManager.context);
  startPlugin(wrapper);
} catch(Throwable t) {

相关文章