com.sun.jersey.spi.container.WebApplication.initiate()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(117)

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

WebApplication.initiate介绍

[英]Initiate the Web application.

This method can only be called once. Further calls will result in an exception.
[中]启动Web应用程序。
此方法只能调用一次。进一步调用将导致异常。

代码示例

代码示例来源:origin: com.sun.jersey/jersey-server

wa.initiate(resourceConfig, factory);

代码示例来源:origin: korpling/ANNIS

@Override
 protected void initiate(ResourceConfig rc, WebApplication wa)
 {
  wa.initiate(rc, factory);
 }
};

代码示例来源:origin: com.sun.jersey/jersey-bundle

/**
 * Initiate the {@link WebApplication}.
 * <p>
 * This method will be called once at initiation and for
 * each reload of the Web application.
 * <p>
 * An inheriting class may override this method to initiate the
 * Web application with different parameters.
 *
 * @param rc the Resource configuration
 * @param wa the Web application
 */
protected void initiate(ResourceConfig rc, WebApplication wa) {
  wa.initiate(rc);
}

代码示例来源:origin: com.sun.jersey/jersey-servlet

/**
 * Initiate the {@link WebApplication}.
 * <p/>
 * This method will be called once at initiation and for
 * each reload of the Web application.
 * <p/>
 * An inheriting class may override this method to initiate the
 * Web application with different parameters.
 *
 * @param rc the Resource configuration
 * @param wa the Web application
 */
protected void initiate(ResourceConfig rc, WebApplication wa) {
  wa.initiate(rc);
}

代码示例来源:origin: com.sun.jersey/jersey-bundle

/**
 * Initiate the {@link WebApplication}.
 * <p/>
 * This method will be called once at initiation and for
 * each reload of the Web application.
 * <p/>
 * An inheriting class may override this method to initiate the
 * Web application with different parameters.
 *
 * @param rc the Resource configuration
 * @param wa the Web application
 */
protected void initiate(ResourceConfig rc, WebApplication wa) {
  wa.initiate(rc);
}

代码示例来源:origin: jersey/jersey-1.x

/**
 * Initiate the {@link WebApplication}.
 * <p/>
 * This method will be called once at initiation and for
 * each reload of the Web application.
 * <p/>
 * An inheriting class may override this method to initiate the
 * Web application with different parameters.
 *
 * @param rc the Resource configuration
 * @param wa the Web application
 */
protected void initiate(ResourceConfig rc, WebApplication wa) {
  wa.initiate(rc);
}

代码示例来源:origin: com.sun.jersey/jersey-servlet

/**
 * Initiate the {@link WebApplication}.
 * <p>
 * This method will be called once at initiation and for
 * each reload of the Web application.
 * <p>
 * An inheriting class may override this method to initiate the
 * Web application with different parameters.
 *
 * @param rc the Resource configuration
 * @param wa the Web application
 */
protected void initiate(ResourceConfig rc, WebApplication wa) {
  wa.initiate(rc);
}

代码示例来源:origin: jersey/jersey-1.x

/**
 * Initiate the {@link WebApplication}.
 * <p>
 * This method will be called once at initiation and for
 * each reload of the Web application.
 * <p>
 * An inheriting class may override this method to initiate the
 * Web application with different parameters.
 *
 * @param rc the Resource configuration
 * @param wa the Web application
 */
protected void initiate(ResourceConfig rc, WebApplication wa) {
  wa.initiate(rc);
}

代码示例来源:origin: org.sonatype.sisu.siesta/siesta-server

protected void initiate(final ResourceConfig config, final WebApplication webApp) {
 this.resourceConfig = checkNotNull(config);
 this.webApplication = webApp;
 webApp.initiate(config, componentProviderFactory);
}

代码示例来源:origin: org.codehaus.enunciate/enunciate-jersey-rt

@Override
protected void initiate(ResourceConfig rc, WebApplication wa) {
 wa.initiate(rc, loadResourceProviderFacotry(rc));
 this.resourceConfig = rc;
}

代码示例来源:origin: com.atlassian.plugins.rest/atlassian-rest-module

@Override
  protected void initiate(ResourceConfig resourceConfig, WebApplication webApplication) {
    webApplication.initiate(resourceConfig, new OsgiComponentProviderFactory(resourceConfig, plugin));
  }
}

代码示例来源:origin: com.sun.jersey.contribs/jersey-guice

@Override
protected void initiate(ResourceConfig config, WebApplication webapp) {
  this.webapp = webapp;
  webapp.initiate(config, new ServletGuiceComponentProviderFactory(config, injector));
}

代码示例来源:origin: org.atmosphere/atmosphere-guice

@Override
protected void initiate(ResourceConfig config, WebApplication webapp) {
  this.webapp = webapp;
  webapp.initiate(config, new ServletGuiceComponentProviderFactory(config, injector));
}

代码示例来源:origin: Atmosphere/atmosphere-extensions

@Override
protected void initiate(ResourceConfig config, WebApplication webapp) {
  this.webapp = webapp;
  webapp.initiate(config, new ServletGuiceComponentProviderFactory(config, injector));
}

代码示例来源:origin: com.vaadin.external.atmosphere/atmosphere-guice

@Override
protected void initiate(ResourceConfig config, WebApplication webapp) {
  this.webapp = webapp;
  webapp.initiate(config, new ServletGuiceComponentProviderFactory(config, injector));
}

代码示例来源:origin: com.sun.jersey.contribs/jersey-spring

@Override
protected void initiate(ResourceConfig rc, WebApplication wa) {
  try {
    wa.initiate(rc, new SpringComponentProviderFactory(rc, getContext()));
  } catch (RuntimeException e) {
    LOGGER.log(Level.SEVERE, "Exception occurred when intialization", e);
    throw e;
  }
}

代码示例来源:origin: com.sun.jersey/jersey-spring

@Override
protected void initiate(ResourceConfig rc, WebApplication wa) {
  try {
    final WebApplicationContext springContext = WebApplicationContextUtils.
        getRequiredWebApplicationContext(getServletContext());
    
    if ( rc.getProperty( ResourceConfig.PROPERTY_DEFAULT_RESOURCE_PROVIDER_CLASS ) == null
        && springComponentAnnotationAvailable() ) {
      rc.getProperties().put( ResourceConfig.PROPERTY_DEFAULT_RESOURCE_PROVIDER_CLASS,
          SpringResourceProvider.class );
    }
    
    wa.initiate(rc, new SpringComponentProvider((ConfigurableApplicationContext) springContext));
  } catch( RuntimeException e ) {
    LOGGER.log(Level.SEVERE, "Exception occurred when intialization", e);
    throw e;
  }
}

代码示例来源:origin: com.sun.jersey/jersey-bundle

wa.initiate(resourceConfig, factory);

代码示例来源:origin: uk.org.retep.microkernel.web/jersey

@Override
  protected void initiate( final ResourceConfig rc, final WebApplication wa )
  {
    try
    {
      // Add all classes discovered by the post processor to the ResourceConfig
      final Set<Class<?>> classes =
          Kernel.getInstance().<KernelComponentPostProcessor>getBean(
          PROCESSOR_BEAN ).getClasses();

      log.debug( "Discovered %d provider/root classes", classes.size() );

      rc.getClasses().addAll( classes );

      log.debug( "%d provider/root classes in config",
            rc.getClasses().size() );

      // Now initiate the WebApplication
      wa.initiate( rc, new KernelComponentProviderFactory() );
    }
    catch( RuntimeException e )
    {
      log.error( "Exception occurred when intialization", e );
      throw e;
    }
  }
}

代码示例来源:origin: jersey/jersey-1.x

wa.initiate(resourceConfig, factory);

相关文章