ICE - 企业使用的工具
来源:互联网 发布:淘宝嘉联华 编辑:程序博客网 时间:2024/05/17 22:02
zeroc ice,简称ice,是指ZeroC公司的ICE(Internet Communications Engine)中间件平台。对于客户端和服务端程序的开发提供了很大的便利。
简介
ZeroC ICE 是指ZeroC公司的ICE(Internet Communications Engine)中间件平台。对于客户端和服务端程序的开发提供了很大的便利。
目前ICE平台中包括Ice,Ice-E,Ice Touch。
Ice为主流平台设计,包括Windows和Linux,支持广泛的语言,包括C++,Java,C#(和其他.Net的语言,例如Visual Basic),Python,Ruby,PHP和ActionScript。也包括所有的ICE服务,例如Ice Grid,IceStorm等。
Ice-E是Ice在资源受限的平台上的一个实现,支持C++和嵌入式操作系统,例如Windows CE,Linux。Ice-E本身不包含任何服务,但是可以利用在Ice上提供的各种服务。因此,通过Ice-E,移动设备也能无缝的集成到分布式系统中。
Ice Touch是为iphone和ipod touch开发的版本,包括Object-C映射,支持Iphone OS,并为MAC OS X开发图形界面应用程序提供完整的Cocoa框架的访问。1
使用样例
你可以在官方网站下载到ice-3.6.1。在安装目录即可找到一个官方提供的Demo包。具体使用可参考“官方网站2 ”中的内容。
正文
不说废话,其实我也不太懂这个ICE的,在我公司使用到了它来激活某个服务
》监听器
public class ComponentServerListener implements ServletContextListener { private static Logger log = LoggerFactory.getLogger(ComponentServerListener.class); public static Thread thread = null; public void contextInitialized(ServletContextEvent arg0) { log.info("ComponentServerListener启动"); if (thread == null) { thread = new Thread(new Runnable() { public void run() { ComponentServer iceServer = new ComponentServer(); iceServer.start(); } }); thread.start(); } log.info("ComponentServerListener启动完成"); } public void contextDestroyed(ServletContextEvent arg0) { log.info("ComponentServerListener销毁"); if (thread != null) { thread.interrupt(); } log.info("ComponentServerListener销毁完成"); }}
》服务器
public class ComponentServer { private static Logger log = LoggerFactory.getLogger(ComponentServer.class); private Communicator communicator = null; private ObjectAdapter objectAdapter = null; private ServantLocator servantLocator = null; public static void main(String[] args) { ComponentServer iceServer = new ComponentServer(); log.info("开始启动组件服务器..."); iceServer.start(); } public void start() { long startTime = (new Date()).getTime(); log.info("组件服务器启动开始:{}", DateKit.formatDate(startTime, "yyyy-MM-dd HH:mm:ss.SS")); Properties prop = Util.createProperties(); Map config = PropertiesKit.getBundleAllProperties("config/component_server_config"); Iterator initData = config.keySet().iterator(); String adapterId; while (initData.hasNext()) { adapterId = (String) initData.next(); prop.setProperty(adapterId, (String) config.get(adapterId)); } log.info("组件服务器运行环境配置:", config); InitializationData initData1 = new InitializationData(); initData1.properties = prop; this.communicator = Util.initialize(initData1); log.info("组件服务器Communicator对象成功."); adapterId = (String) config.get("Server.AdapterId"); String endPoint = (String) config.get("Server.EndPoint"); log.info("组件服务器当前使用适配器Id[{}], 监听请求端点[{}]", adapterId, endPoint); this.objectAdapter = this.communicator.createObjectAdapterWithEndpoints(adapterId, endPoint); this.servantLocator = new ComponentServantLocator(); this.objectAdapter.addServantLocator(this.servantLocator, ""); this.objectAdapter.activate(); String threadName = String.valueOf(System.identityHashCode(this)); log.info("组件服务器启动线程[{}]", threadName); log.info("组件服务器启动成功!"); long endTime = (new Date()).getTime(); log.info("组件服务器启动完成:{}", DateKit.formatDate(endTime, "yyyy-MM-dd HH:mm:ss.SS")); log.info("本次启动耗时:{} ms", Long.valueOf(endTime - startTime)); Thread.currentThread().setName(threadName); String initDBFactory = (String) config.get("Server.initDBFactory"); if (initDBFactory.equals("true")) { ComponentDBFactory.init(); } }}
有经验的人欢迎评论分享下知识啊,另外转载一个很久以前的文章:http://blog.csdn.net/god_wot/article/details/50332997
- An Overview of the Ice Platform ↩
- 官方网站 ↩
- ICE - 企业使用的工具
- 企业使用的BI工具
- ICE的工具集基本功能
- ICE的proxy使用
- ICE的插件使用
- ice的facet使用
- ICE的Glacier2使用
- ICE的使用
- Ice Session的使用
- ICE的Glacier2使用
- ICE的使用
- 使用企业即时通讯工具
- Ice中Monitor的使用
- Ice中Monitor的使用
- 使用ICE遇到的编译问题
- ubuntu下ice的安装和使用
- 使用ICE实现一个简单的文件系统
- ice使用过程遇到的问题
- Linux网络编程--网络编程基本原理
- Qt中 QString 和int, char等的“相互”转换
- HDU 2767
- UGUI的优先级
- Qt “无法解析的外部符号 未找到文件 ***.obj”
- ICE - 企业使用的工具
- python数据类型详解
- Android基础面试题集
- 谈谈Android App混合开发
- Python2.4+ 与 Python3.0+ 主要变化或新增内容
- MCMF算法
- 快速入门Openstack,无脑多节点部署Mitaka(5)--Nova部署
- Nginx反向代理Odoo后导致日志中Werkzeug记录的IP地址不正确的问题
- 身份证实名认证