public class AVIMClient extends Object
| 限定符和类型 | 类和说明 |
|---|---|
static class |
AVIMClient.AVIMClientStatus
当前client的状态
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close(AVIMClientCallback callback)
close client.
|
void |
createChatRoom(List<String> conversationMembers,
String name,
Map<String,Object> attributes,
boolean isUnique,
AVIMConversationCreatedCallback callback)
Create a new Chatroom
|
void |
createConversation(List<String> conversationMembers,
Map<String,Object> attributes,
AVIMConversationCreatedCallback callback)
Create a new Conversation
|
void |
createConversation(List<String> conversationMembers,
String name,
Map<String,Object> attributes,
AVIMConversationCreatedCallback callback)
Create a new Conversation
|
void |
createConversation(List<String> members,
String name,
Map<String,Object> attributes,
boolean isTransient,
AVIMConversationCreatedCallback callback)
Create a new Conversation
|
void |
createConversation(List<String> members,
String name,
Map<String,Object> attributes,
boolean isTransient,
boolean isUnique,
AVIMConversationCreatedCallback callback)
Create a new Conversation
|
void |
createTemporaryConversation(List<String> conversationMembers,
AVIMConversationCreatedCallback callback)
Create a new temporary Conversation
|
void |
createTemporaryConversation(List<String> conversationMembers,
int ttl,
AVIMConversationCreatedCallback callback)
Create a new temporary Conversation
|
AVIMConversation |
getChatRoom(String conversationId)
get an existed Chatroom by id
|
AVIMConversationsQuery |
getChatRoomQuery()
获取开放聊天室的查询对象
开发者拿到这个对象之后,就可以像 AVIMConversationsQuery 以前的接口一样对目标属性(如名字)等进行查询。
|
static AVIMClientEventHandler |
getClientEventHandler() |
String |
getClientId()
获取当前用户的 clientId
|
static int |
getClientsCount()
count used clients.
|
void |
getClientStatus(AVIMClientStatusCallback callback) |
AVIMConversation |
getConversation(String conversationId)
get conversation by id
|
AVIMConversation |
getConversation(String conversationId,
boolean isTransient,
boolean isTemporary)
get an existed conversation
|
AVIMConversation |
getConversation(String conversationId,
int convType)
get conversation by id and type
|
AVIMConversationsQuery |
getConversationsQuery()
获取 AVIMConversationsQuery 对象,以此来查询 conversation
|
static String |
getDefaultClient()
get default clientId.
|
static AVIMClient |
getInstance(AVUser user)
get AVIMClient instance by AVUser
|
static AVIMClient |
getInstance(AVUser user,
String tag) |
static AVIMClient |
getInstance(String clientId)
get AVIMClient instance by clientId.
|
static AVIMClient |
getInstance(String clientId,
String tag)
get AVIMClient instance by clientId and tag.
|
void |
getOnlineClients(List<String> clients,
AVIMOnlineClientsCallback callback)
Query online clients.
|
AVIMConversation |
getServiceConversation(String conversationId)
get an existed Service Conversation
|
AVIMConversationsQuery |
getServiceConversationQuery()
获取服务号的查询对象
开发者拿到这个对象之后,就可以像 AVIMConversationsQuery 以前的接口一样对目标属性(如名字)等进行查询。
|
AVIMConversation |
getTemporaryConversation(String conversationId)
get an existed temporary conversation
|
protected void |
localClose() |
void |
open(AVIMClientCallback callback)
Open client.
|
void |
open(AVIMClientOpenOption option,
AVIMClientCallback callback)
Open Client with options.
|
static void |
setClientEventHandler(AVIMClientEventHandler handler)
设置AVIMClient的事件处理单元,
包括Client断开链接和重连成功事件
|
void |
updateRealtimeSessionToken(String token,
long expiredInSec)
[internal use only]
update realtime session token
|
public static void setClientEventHandler(AVIMClientEventHandler handler)
handler - public static AVIMClientEventHandler getClientEventHandler()
public static AVIMClient getInstance(String clientId)
clientId - public static int getClientsCount()
public static String getDefaultClient()
public static AVIMClient getInstance(String clientId, String tag)
clientId - tag - public static AVIMClient getInstance(AVUser user)
user - public static AVIMClient getInstance(AVUser user, String tag)
public void getClientStatus(AVIMClientStatusCallback callback)
public String getClientId()
public void open(AVIMClientCallback callback)
callback - public void open(AVIMClientOpenOption option, AVIMClientCallback callback)
option - callback - public void getOnlineClients(List<String> clients, AVIMOnlineClientsCallback callback)
clients - callback - public void createConversation(List<String> conversationMembers, Map<String,Object> attributes, AVIMConversationCreatedCallback callback)
conversationMembers - attributes - callback - public void createConversation(List<String> conversationMembers, String name, Map<String,Object> attributes, AVIMConversationCreatedCallback callback)
conversationMembers - name - attributes - callback - public void createConversation(List<String> members, String name, Map<String,Object> attributes, boolean isTransient, AVIMConversationCreatedCallback callback)
members - name - attributes - isTransient - callback - public void createConversation(List<String> members, String name, Map<String,Object> attributes, boolean isTransient, boolean isUnique, AVIMConversationCreatedCallback callback)
members - name - attributes - isTransient - isUnique - callback - public void createTemporaryConversation(List<String> conversationMembers, AVIMConversationCreatedCallback callback)
conversationMembers - callback - public void createTemporaryConversation(List<String> conversationMembers, int ttl, AVIMConversationCreatedCallback callback)
conversationMembers - ttl - callback - public void createChatRoom(List<String> conversationMembers, String name, Map<String,Object> attributes, boolean isUnique, AVIMConversationCreatedCallback callback)
conversationMembers - name - attributes - isUnique - deprecated chatroom is always not unique.callback - public AVIMConversation getConversation(String conversationId)
conversationId - public AVIMConversation getConversation(String conversationId, int convType)
conversationId - convType - public AVIMConversation getConversation(String conversationId, boolean isTransient, boolean isTemporary)
conversationId - isTransient - isTemporary - public AVIMConversation getChatRoom(String conversationId)
conversationId - public AVIMConversation getServiceConversation(String conversationId)
conversationId - public AVIMConversation getTemporaryConversation(String conversationId)
conversationId - public AVIMConversationsQuery getConversationsQuery()
public AVIMConversationsQuery getServiceConversationQuery()
public AVIMConversationsQuery getChatRoomQuery()
public void close(AVIMClientCallback callback)
callback - public void updateRealtimeSessionToken(String token, long expiredInSec)
token - expiredInSec - protected void localClose()
Copyright © 2019. All rights reserved.