hyphenate_SDK3.0  3.0.1
hyphenatejavaIMSDK
Public Member Functions | List of all members
com.hyphenate.chat.EMChatRoomManager Class Reference

Public Member Functions

 EMChatRoomManager (EMClient client, EMAChatRoomManager manager)
 
void addChatRoomChangeListener (EMChatRoomChangeListener listener)
 
void removeChatRoomChangeListener (EMChatRoomChangeListener listener)
 
void joinChatRoom (final String roomId, final EMValueCallBack< EMChatRoom > callback)
 
void leaveChatRoom (final String roomId)
 
EMCursorResult< EMChatRoomfetchPublicChatRoomsFromServer (int pageSize, String cursor) throws HyphenateException
 
EMChatRoom fetchChatRoomFromServer (String roomId) throws HyphenateException
 
EMChatRoom getChatRoom (String roomId)
 
List< EMChatRoomgetAllChatRooms ()
 

Member Function Documentation

void com.hyphenate.chat.EMChatRoomManager.addChatRoomChangeListener ( EMChatRoomChangeListener  listener)

register chat room change listener

Parameters
listener
EMChatRoom com.hyphenate.chat.EMChatRoomManager.fetchChatRoomFromServer ( String  roomId) throws HyphenateException

fetch the chat room by room id

Parameters
roomId
Returns
EMChatRoom
Exceptions
HyphenateException
EMCursorResult<EMChatRoom> com.hyphenate.chat.EMChatRoomManager.fetchPublicChatRoomsFromServer ( int  pageSize,
String  cursor 
) throws HyphenateException

fetch the chatroom in page synchronoulsy this is a time consuming ooperation

Parameters
pageSizehow many chat room to get
cursorcursor position
Returns
EMResult<EMChatRoom>List<EMChatRoom>
Exceptions
HyphenateException
List<EMChatRoom> com.hyphenate.chat.EMChatRoomManager.getAllChatRooms ( )

get all chat rooms in the cache

Returns
EMChatRoom com.hyphenate.chat.EMChatRoomManager.getChatRoom ( String  roomId)

get the chat room in the cache

Parameters
roomId
Returns
void com.hyphenate.chat.EMChatRoomManager.joinChatRoom ( final String  roomId,
final EMValueCallBack< EMChatRoom callback 
)

join the chat room asynchronously

Parameters
roomIdchat room id
callbackcallback for success or fail
void com.hyphenate.chat.EMChatRoomManager.leaveChatRoom ( final String  roomId)

leave the chat room asynchronously

Parameters
roomId
void com.hyphenate.chat.EMChatRoomManager.removeChatRoomChangeListener ( EMChatRoomChangeListener  listener)

remove chat room change listener

Parameters
listener

The documentation for this class was generated from the following file: