public class ChatService extends java.lang.Object implements ChatListener
NOTE: Multi-party conversations that are constructed via incoming messages are enriched over time. Currently there is no way of identifying all users of an incoming message from a given stream.
Constructor and Description |
---|
ChatService(SymphonyClient symClient)
Init
|
Modifier and Type | Method and Description |
---|---|
boolean |
addChat(Chat chat)
Add a predefined chat to the service.
|
boolean |
addListener(ChatServiceListener chatServiceListener) |
Chat |
getChatByStream(java.lang.String streamId)
Get a given Chat by streamId
|
java.util.Set<Chat> |
getChats(SymUser user)
Return a set of chats for a given user
|
java.util.Set<Chat> |
getChatsByEmail(java.lang.String email)
Returns a set of chats from a given email address (resolved to UserID).
|
void |
onChatMessage(SymMessage symMessage)
Process incoming message from ChatListener
|
boolean |
registerListener(ChatServiceListener chatServiceListener)
Deprecated.
|
boolean |
removeChat(Chat chat)
Remove Chat conversation
|
boolean |
removeListener(ChatServiceListener chatServiceListener) |
public ChatService(SymphonyClient symClient)
symClient
- Symphony Client required to access all underlying clients functions.public boolean addChat(Chat chat)
Note: In the future response object will be available to provide additional detail.
chat
- Chat with remote users defined. Stream not required and will be generated.public boolean removeChat(Chat chat)
chat
- Chat object to removepublic void onChatMessage(SymMessage symMessage)
onChatMessage
in interface ChatListener
symMessage
- Incoming SymMessage
@Deprecated public boolean registerListener(ChatServiceListener chatServiceListener)
addListener(ChatServiceListener)
chatServiceListener
- ChatServiceListener
public boolean addListener(ChatServiceListener chatServiceListener)
chatServiceListener
- ChatServiceListener
public boolean removeListener(ChatServiceListener chatServiceListener)
chatServiceListener
- ChatServiceListener
public java.util.Set<Chat> getChatsByEmail(java.lang.String email)
email
- User emailpublic java.util.Set<Chat> getChats(SymUser user)
user
- SymUser
public Chat getChatByStream(java.lang.String streamId)
streamId
- Stream ID