Chatroom 类(Android IMLib)
类继承图
Object→Chatroom
继承关系:Object → Chatroom。该数据结构不包含行为方法,字段与 domain.json → schemas.Chatroom 一一对应。
类说明
聊天室资料:在线态会话,不落离线历史,默认只广播在线成员;保活/销毁由生命周期策略控制。
| 项 | 值 |
|---|---|
| 类型 | 数据结构(值对象) |
| 字段数 | 8 |
| IDL 定义 | domain.json → schemas.Chatroom |
| 程序包 | io.nipaas.imlib |
| 跨端一致性 | 字段名与取值在 7 个平台绑定中一致;仅语言类型映射不同 |
| 平台状态 | 已交付 |
字段概要
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
chatroomId | string | 是 | 聊天室 ID |
name | string | 是 | 名称 |
owner | string | 否 | 群主 userId |
memberCount | uint32 | 是 | 成员数量 |
onlineCount | uint32 | 是 | 在线人数 |
alive | bool | 是 | 聊天室是否存活 |
createdAt | int64 | 是 | 创建时间(epoch ms) |
destroyAt | int64 | 否 | 自动销毁时间(epoch ms) |
详细字段说明
string chatroomId聊天室 ID
string name名称
string owner群主 userId
uint32 memberCount成员数量
uint32 onlineCount在线人数
bool alive聊天室是否存活
int64 createdAt创建时间(epoch ms)
int64 destroyAt自动销毁时间(epoch ms)
相关链接
- 关联类型:ChatroomMember、IMClient
- 关联枚举:ChatroomEventKind
- 关联方法:createChatroom、joinChatroom、getChatroomInfo、getChatroomMembers
- 返回索引:类 / 枚举