public interface ChatClientListener
Modifier and Type | Method and Description |
---|---|
void |
onChannelAdded(Channel channel)
Called when the current user is added to a channel.
|
void |
onChannelDeleted(Channel channel)
Called when one of the channel of the current user is deleted.
|
void |
onChannelInvited(Channel channel)
Called when the current user is invited to a channel.
|
void |
onChannelJoined(Channel channel)
Called when the current user joins a channel.
|
void |
onChannelSynchronizationChange(Channel channel)
Called when channel synchronization status changed.
|
void |
onChannelUpdated(Channel channel,
Channel.UpdateReason reason)
Called when the channel is updated.
|
void |
onClientSynchronization(ChatClient.SynchronizationStatus status)
Called when client synchronization status changes
|
void |
onConnectionStateChange(ChatClient.ConnectionState state)
Called when client connnection state has changed.
|
void |
onError(ErrorInfo errorInfo)
Called when an error condition occurs.
|
void |
onNotification(java.lang.String channelId,
java.lang.String messageId)
Called when client receives a GCM notification.
|
void |
onNotificationFailed(ErrorInfo errorInfo)
Called when registering for push notifications fails.
|
void |
onNotificationSubscribed()
Called when you are successfully registered for push notifications.
|
void |
onUserSubscribed(User user)
Called when a user is subscribed to and will receive realtime state updates.
|
void |
onUserUnsubscribed(User user)
Called when a user is unsubscribed from and will not receive realtime state updates anymore.
|
void |
onUserUpdated(User user,
User.UpdateReason reason)
Called when user info is updated for currently loaded users
|
void onChannelJoined(Channel channel)
channel
- The channel that got added.void onChannelInvited(Channel channel)
channel
- The channel that the user is invited to.void onChannelAdded(Channel channel)
channel
- The channel that got added.void onChannelUpdated(Channel channel, Channel.UpdateReason reason)
channel
- The channel that updated.reason
- Which information in the channel has updated.void onChannelDeleted(Channel channel)
channel
- The channel that got deleted.void onChannelSynchronizationChange(Channel channel)
channel
- Callback for this Channel.void onError(ErrorInfo errorInfo)
errorInfo
- ErrorInfo
object containing error infovoid onUserUpdated(User user, User.UpdateReason reason)
user
- User info object.reason
- Reason for update.void onUserSubscribed(User user)
user
- User that has been subscribed.void onUserUnsubscribed(User user)
user
- User that has been unsubscribed.void onClientSynchronization(ChatClient.SynchronizationStatus status)
status
- new client synchronization statusvoid onNotification(java.lang.String channelId, java.lang.String messageId)
channelId
- Sid of related channelmessageId
- Sid of related message, if applicable, empty string otherwisevoid onNotificationSubscribed()
void onNotificationFailed(ErrorInfo errorInfo)
errorInfo
- An error indicating the failure.void onConnectionStateChange(ChatClient.ConnectionState state)
state
- New connection state.