• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java GrizzlyWebContainerFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StreamType类代码示例发布时间:2022-05-22
下一篇:
Java Drawing类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap