# ChatManager

class ChatManager

Manager class for global management of the chat service. Implements Request Coalescing to avoid duplicate network calls.

## Types

Companion
Link copied to clipboard
object Companion

## Properties

chatMetric
Link copied to clipboard
var chatMetric: ChatMetric?
chats
Link copied to clipboard
val chats: Chats
isConnected
Link copied to clipboard
val isConnected: Boolean
state
Link copied to clipboard
val state: Observable<XmppClient.State>

## Functions

connect
Link copied to clipboard
fun connect(isDebugEnabled: Boolean = false): Completable

Initiates connection to chat service.

disconnect
Link copied to clipboard
fun disconnect(): Completable

Disconnects completely.

getChat
Link copied to clipboard
fun getChat(xmppJid: XmppJid, forceUpdate: Boolean): Maybe<Chat>
getChats
Link copied to clipboard
fun getChats(forceRefresh: Boolean = false): Single<List<Chat>>
restore
Link copied to clipboard
fun restore(isDebugEnabled: Boolean = false): Completable

Restores connection.

suspend
Link copied to clipboard
fun suspend(): Completable

Suspends connection.