• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java ModuleProcessor类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中org.jboss.resteasy.plugins.guice.ModuleProcessor的典型用法代码示例。如果您正苦于以下问题:Java ModuleProcessor类的具体用法?Java ModuleProcessor怎么用?Java ModuleProcessor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

ModuleProcessor类属于org.jboss.resteasy.plugins.guice包,在下文中一共展示了ModuleProcessor类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: contextInitialized

点赞 3

import org.jboss.resteasy.plugins.guice.ModuleProcessor; //导入依赖的package包/类
@Override
public void contextInitialized(ServletContextEvent event) {
  super.contextInitialized(event);

  final ServletContext context = event.getServletContext();
  final Registry registry = (Registry) context.getAttribute(Registry.class.getName());
  final ResteasyProviderFactory providerFactory =
      (ResteasyProviderFactory) context.getAttribute(ResteasyProviderFactory.class.getName());
  final ModuleProcessor processor = new ModuleProcessor(registry, providerFactory);

  final List<? extends Module> appModules = getModules(context);

  List<Module> modules = Lists.newArrayList();
  modules.addAll(appModules);

  injector = GuiceLifecycleContainers.initialize(this, modules);

  withInjector(injector);

  processor.processInjector(injector);
}
 

开发者ID:cerner,
项目名称:beadledom,
代码行数:22,
代码来源:ResteasyContextListener.java

示例2: start

点赞 2

import org.jboss.resteasy.plugins.guice.ModuleProcessor; //导入依赖的package包/类
@Override
public void start() {
    super.start();

    Injector injector = Guice.createInjector(new GossipLogModule(configPath), new GossipConfigModule(configPath, configFile),
        new GossipDataModule(), new GossipResourceModule());
    ModuleProcessor processor = new ModuleProcessor(deployment.getRegistry(), deployment.getProviderFactory());
    processor.processInjector(injector);

    log.info("Successfully launched gossip server");
}
 

开发者ID:syhily,
项目名称:gossip,
代码行数:12,
代码来源:GossipServer.java

示例3: init

点赞 2

import org.jboss.resteasy.plugins.guice.ModuleProcessor; //导入依赖的package包/类
/**
 */
@Override
public void init(FilterConfig cfg) throws ServletException {
	super.init(cfg);

	final ServletContext context = cfg.getServletContext();
	final ResteasyDeployment deployment = (ResteasyDeployment) context.getAttribute(ResteasyDeployment.class.getName());
	final Registry registry = deployment.getRegistry();
	final ResteasyProviderFactory providerFactory = deployment.getProviderFactory();
	final ModuleProcessor processor = new ModuleProcessor(registry, providerFactory);

	processor.processInjector(injector);
}
 

开发者ID:stickfigure,
项目名称:gstrap,
代码行数:15,
代码来源:GuiceResteasyFilterDispatcher.java

示例4: init

点赞 2

import org.jboss.resteasy.plugins.guice.ModuleProcessor; //导入依赖的package包/类
@Override
public void init(FilterConfig config) throws ServletException {

	config.getServletContext().setInitParameter("resteasy.servlet.mapping.prefix", "/api");
	config.getServletContext().setInitParameter("javax.ws.rs.Application", RestApplication.class.getName());
	config.getServletContext().setInitParameter("resteasy.logger.type", "SLF4J");
	
	super.init(config);

	Registry registry = getDispatcher().getRegistry();
	ResteasyProviderFactory providerFactory = getDispatcher().getProviderFactory();

	ModuleProcessor processor = new ModuleProcessor(registry, providerFactory);

	Injector injector = parentInjector.createChildInjector(getModule());

	processor.processInjector(injector);

	while (injector.getParent() != null) {
		injector = injector.getParent();
		processor.processInjector(injector);
	}      

}
 

开发者ID:vsite-hr,
项目名称:mentor,
代码行数:25,
代码来源:GuiceFilterDispatcher.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)