当前位置: 首页>>代码示例>>Java>>正文


Java GrizzlyWebContainerFactory类代码示例

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


GrizzlyWebContainerFactory类属于com.sun.jersey.api.container.grizzly包,在下文中一共展示了GrizzlyWebContainerFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runServer

import com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory; //导入依赖的package包/类
private static void runServer(RefAppConfigurator configurator) throws IOException, InterruptedException {
    URI baseUri = UriBuilder.fromUri("http://localhost/").port(configurator.getServerPort()).build();

    Map<String, String> params = new HashMap<String, String>();
    params.put("com.sun.jersey.config.property.packages", "com.comcast.xfinity.sirius.refapplication.endpoints");

    SelectorThread thread = GrizzlyWebContainerFactory.create(baseUri, params);

    System.out.println();
    System.out.println("Server fired up, using akka over TCP. Akka address for this server:");
    System.out.println(configurator.getAkkaPath());
    System.out.println("Hit ctrl-c to quit.");
    try {
        while (true) {
            // put the local thread to sleep, let grizzly do its thing
            Thread.sleep(1000L);
        }
    } finally {
        thread.stopEndpoint();
    }
}
 
开发者ID:Comcast,项目名称:sirius-reference-app,代码行数:22,代码来源:StartServer.java

示例2: startServer

import com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory; //导入依赖的package包/类
protected static SelectorThread startServer() throws IOException {
    final Map<String, String> initParams = new HashMap<String, String>();

    initParams.put("com.sun.jersey.config.property.packages",
            "com.melon");

    System.out.println("Starting grizzly...");
    SelectorThread threadSelector = GrizzlyWebContainerFactory.create(BASE_URI, initParams);
    return threadSelector;
}
 
开发者ID:ansafari,项目名称:melon,代码行数:11,代码来源:Main.java

示例3: startWebServices

import com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory; //导入依赖的package包/类
public static void startWebServices(final String baseUri) throws IOException, IllegalArgumentException {
    final Map<String, String> initParams = new HashMap<String, String>();
    initParams.put("com.sun.jersey.config.property.packages", "org.caboclo.webservices");
    System.out.println("Starting backup server on " + baseUri);
    SelectorThread threadSelector = GrizzlyWebContainerFactory.create(baseUri, initParams);
    System.in.read();
    threadSelector.stopEndpoint();
    System.exit(0);
}
 
开发者ID:modcs,项目名称:caboclo,代码行数:10,代码来源:WebServicesMain.java

示例4: startServer

import com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory; //导入依赖的package包/类
private static SelectorThread startServer()
		throws IllegalArgumentException, IOException {
	// TODO Auto-generated method stub
	Map<String, String> initParams = new HashMap<String, String>();
	initParams.put("com.sun.jersey.config.property.packages",
			"course.cloud.computing.rest");
	SelectorThread factory = GrizzlyWebContainerFactory.create(BASE_URI, initParams);
	return factory;
}
 
开发者ID:vdialani,项目名称:CloudComputing,代码行数:10,代码来源:App.java

示例5: execute

import com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory; //导入依赖的package包/类
public SelectorThread execute() throws IOException {
    final Map<String, String> initParams = new HashMap<String, String>();

    initParams.put("com.sun.jersey.config.property.packages",
                   "org.apache.zookeeper.server.jersey.resources");

    System.out.println("Starting grizzly...");
    SelectorThread threadSelector =
        GrizzlyWebContainerFactory.create(baseUri, initParams);

    return threadSelector;
}
 
开发者ID:prodigeni,项目名称:zookeeper.dsc,代码行数:13,代码来源:RestMain.java

示例6: start

import com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory; //导入依赖的package包/类
/**
 * Start the server on the BASE_URI using resources located in RESOURCE_PACKAGE
 * @return true if the server started normally, false otherwise
 */
public static boolean start() {
	final Map<String, String> initParams = new HashMap<String, String>();

	initParams.put("com.sun.jersey.config.property.packages", RESOURCE_PACKAGE);
	try {
		threadSelector = GrizzlyWebContainerFactory.create(BASE_URI, initParams);
		return true;
	} catch (IOException e) {}
	
	return false;
}
 
开发者ID:pchaigno,项目名称:chess-service,代码行数:16,代码来源:CentralServerResourceDeployer.java


注:本文中的com.sun.jersey.api.container.grizzly.GrizzlyWebContainerFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。