AIDL中的in,out,inout
来源:互联网 发布:linux运行anaconda 编辑:程序博客网 时间:2024/05/16 16:06
All non-primitive parameters require a directional tag indicating which way the data goes . Either in , out , or inout . Primitives are in by default , and connot be otherwise .
Google官网上的解释:所有的非基本参数都需要一个定向tag来指出数据流通的方式,不管是 in , out , 还是 inout 。基本参数的定向tag默认是并且只能是 in 。
其实
AIDL中的定向 tag 表示了在跨进程通信中数据的流向
- in 表示数据只能由客户端流向服务端
- out 表示数据只能由服务端流向客户端
- inout 则表示数据可在服务端与客户端之间双向流通
其中,数据流向是针对在客户端中的那个传入方法的对象而言的。
- in 为定向 tag 的话表现为服务端将会接收到一个那个对象的完整数据,但是客户端的那个对象不会因为服务端对传参的修改而发生变动;
- out 的话表现为服务端将会接收到那个对象的的空对象,但是在服务端对接收到的空对象有任何修改之后客户端将会同步变动;
- inout 为定向 tag 的情况下,服务端将会接收到客户端传来对象的完整信息,并且客户端将会同步服务端对该对象的任何变动。
参考:http://www.jianshu.com/p/a8e43ad5d7d2
0 0
- AIDL中的in,out,inout
- AIDL中的in,out,inout
- [Android]AIDL中的in,out,inout理解
- Android AIDL中的in,out,inout含义
- AIDL中的in、out、inout是什么?
- 你真的理解AIDL中的in,out,inout么?
- 你真的理解AIDL中的in,out,inout么?
- 你真的理解AIDL中的in,out,inout么?
- 你真的理解AIDL中的in,out,inout么?
- 关于AIDL中的in、out和inout修饰符
- 你真的理解AIDL中的in,out,inout么?
- IPC之AIDL(2)in out inout
- AIDL源码解析in、out和inout
- Android AIDL之in out inout
- AIDL的 in,out,inout指向
- android AIDL : 你真的理解AIDL中的in,out,inout么?
- “In/out/inout” in a AIDL interface parameter value?
- AIDL中in,out和inout的区别
- 【OpenCV入门教程之二】 一览众山小:OpenCV 2.4.8 or OpenCV 2.4.9组件结构全解析
- 记一次处理oracle分区表索引"乱用"引起的SQL性能问题
- 单向链表操作总结
- mvc get 长度控制
- ToggleButton的使用
- AIDL中的in,out,inout
- Linux 进程通信—消息队列
- Android 修改字体
- 搭建金字塔
- 必考的安卓面试题
- 数据挖掘之分类
- ++运算的奇妙之处
- 在Androidstudio中clone github上的自己喜欢的项目(一步到位)
- 采用二叉链表存储结构,实现其各种遍历的方法