ICE学习笔记一----运行官方的java版demo程序
2013-09-22 11:43
627 查看
建议新手和我一样,从官网下载英文文档,开个有道词典,慢慢啃。
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
官方文档下载:
http://download.csdn.net/detail/xiong_mao_1/6300631
程序代码就不说了,我照抄文档的,以下都是个人笔记。
slice2java后,生成了这些文档,具体每个文件的含义有得学习,先mark个。
![](https://img-blog.csdn.net/20130922115748328?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGlvbmdfbWFvXzE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
我是在eclipse中运行的,
结果图!嘿嘿,小兴奋中~~
![](https://img-blog.csdn.net/20130922115927906?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQveGlvbmdfbWFvXzE=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast)
eclipse工程打包下载:
http://download.csdn.net/detail/xiong_mao_1/6300697
关于客户端代码一个知识点:
源码:
Ice.ObjectPrx base = ic.stringToProxy("SimplePrinter:default -p 10000");
PrinterPrx printer = PrinterPrxHelper.checkedCast(base);
官方文档解释:
The proxy returned by sringToProxy is of type
Ice.ObjectPrx,which is at the root of the inheritance tree for interfaces and classes. But to actually talk to our printer, we need a proxy for aPrinterinterface, not anObject interface. To
do this,we need to do adown-cast by callingPrinterPrxHelper.checkedCast.A checked cast sends a message to the server, effectively asking “is this aproxy for a Printer interface?” If so, the
call returns a proxy of typeDemo::Printer; otherwise, if the proxy denotes an interface of some other type,the call returns null.
![](http://static.blog.csdn.net/xheditor/xheditor_emot/default/laugh.gif)
官方文档下载:
http://download.csdn.net/detail/xiong_mao_1/6300631
程序代码就不说了,我照抄文档的,以下都是个人笔记。
slice2java后,生成了这些文档,具体每个文件的含义有得学习,先mark个。
我是在eclipse中运行的,
结果图!嘿嘿,小兴奋中~~
eclipse工程打包下载:
http://download.csdn.net/detail/xiong_mao_1/6300697
关于客户端代码一个知识点:
源码:
Ice.ObjectPrx base = ic.stringToProxy("SimplePrinter:default -p 10000");
PrinterPrx printer = PrinterPrxHelper.checkedCast(base);
官方文档解释:
The proxy returned by sringToProxy is of type
Ice.ObjectPrx,which is at the root of the inheritance tree for interfaces and classes. But to actually talk to our printer, we need a proxy for aPrinterinterface, not anObject interface. To
do this,we need to do adown-cast by callingPrinterPrxHelper.checkedCast.A checked cast sends a message to the server, effectively asking “is this aproxy for a Printer interface?” If so, the
call returns a proxy of typeDemo::Printer; otherwise, if the proxy denotes an interface of some other type,the call returns null.
相关文章推荐
- ICE学习笔记一----运行官方的java版demo程序
- 《疯狂Java讲义(第三版)》学习笔记之 —— 1.3 Java运行机制 && 1.5 第一个Java程序
- java学习笔记——程序运行过程
- Eclipse 4.x学习笔记(1、运行第一个Java程序)
- JAVA学习笔记——运行我的第一个程序(day01)
- java编程思想学习笔记(6)--手动创建、编译、运行Java程序
- Java学习笔记——Java程序运行超时后退出或进行其他操作的实现
- Java基础学习记录笔记(运行环境+程序编写)
- Java学习笔记(一)——Java程序的运行机制
- Java学习笔记01 编译和运行Java程序
- JVM 学习笔记-java程序编译和运行的过程
- 学习笔记--Android Studio运行java程序
- maven学习笔记:命令行模式创建java_spark项目并运行示例程序
- 【Java学习笔记】60:客户端PC-后端程序服务器-数据库服务器之间的通信demo
- Android(java)学习笔记158:Java程序入口和Android的APK入口
- javaSE学习01_java程序运行机制及运行过程
- VS2010+ICE3.5运行官方demo报错----std::bad_alloc
- [原]java专业程序代写(qq:928900200),学习笔记之基础入门<Struts2_实战演练(中)>(三十九)
- 【学习笔记】系列一:Java导出、运行jar包的方法
- 廖雪峰官方网站python学习笔记:第一个Pyhon程序