-
- All Implemented Interfaces:
-
io.getstream.chat.android.client.events.ChatEventHandler
public abstract class BaseChatEventHandler implements ChatEventHandlerMore specific ChatEventHandler implementation that gives you a separation between CidEvent and HasChannel events.
The channel will be removed from the set after receiving ChannelDeletedEvent, NotificationChannelDeletedEvent, ChannelHiddenEvent events.
The channel will be watched and added to the set after receiving ChannelVisibleEvent event.
Other events will be skipped.
-
-
Constructor Summary
Constructors Constructor Description BaseChatEventHandler()
-
Method Summary
Modifier and Type Method Description EventHandlingResulthandleChannelEvent(HasChannel event, FilterObject filter)Handles HasChannel event which contains specific Channel object. EventHandlingResulthandleCidEvent(CidEvent event, FilterObject filter, Channel cachedChannel)Handles CidEvent event which is associated with a specific Channel which can be tracked using CidEvent.cid. EventHandlingResulthandleChatEvent(ChatEvent event, FilterObject filter, Channel cachedChannel)Computes the event handling result. -
-
Method Detail
-
handleChannelEvent
EventHandlingResult handleChannelEvent(HasChannel event, FilterObject filter)
Handles HasChannel event which contains specific Channel object.
- Parameters:
event- ChatEvent that may contain updates for the set of channels.filter- FilterObject associated with the set of channels.
-
handleCidEvent
EventHandlingResult handleCidEvent(CidEvent event, FilterObject filter, Channel cachedChannel)
Handles CidEvent event which is associated with a specific Channel which can be tracked using CidEvent.cid.
- Parameters:
event- ChatEvent that may contain updates for the set of channels.filter- FilterObject associated with the set of channels.cachedChannel- optional cached Channel object if exists.
-
handleChatEvent
EventHandlingResult handleChatEvent(ChatEvent event, FilterObject filter, Channel cachedChannel)
Computes the event handling result.
- Parameters:
event- ChatEvent that may contain updates for the set of channels.filter- FilterObject associated with the set of channels.cachedChannel- optional cached Channel object.
-
-
-
-