Interface DataProcessor
-
- All Implemented Interfaces:
public interface DataProcessor<T>Processor for filtering and configuring channel data before display.
Implement this interface (or extend BaseDataProcessor) to customize which channel types are shown and how they are filtered or aggregated in the channel list.
Register an implementation via setDataProcessor.
-
-
Method Summary
Modifier and Type Method Description abstract Array<ChannelType>supportedTypes()Returns the channel types supported by this data processor. abstract List<T>filtered(List<T> data)Filters the raw channel data before it is displayed in the channel list. abstract booleanisGathered(ChannelType type)Returns whether a channel type is displayed in aggregated (gathered) mode. booleanisGathered(ChannelIdentifier identifier)Returns whether the channel identified by the given identifier is displayed in aggregated mode. -
-
Method Detail
-
supportedTypes
abstract Array<ChannelType> supportedTypes()
Returns the channel types supported by this data processor.
- Returns:
array of supported ai.nexconn.chat.channel.ChannelType values
-
filtered
abstract List<T> filtered(List<T> data)
Filters the raw channel data before it is displayed in the channel list.
Called both when bulk-fetching channels from the database and when a new channel is created from an incoming real-time message.
- Parameters:
data- raw channel list to filter- Returns:
filtered channel list
-
isGathered
abstract boolean isGathered(ChannelType type)
Returns whether a channel type is displayed in aggregated (gathered) mode.
- Parameters:
type- channel type to check- Returns:
trueif the type is gathered;falseotherwise
-
isGathered
boolean isGathered(ChannelIdentifier identifier)
Returns whether the channel identified by the given identifier is displayed in aggregated mode.
- Parameters:
identifier- channel identifier- Returns:
trueif the channel type is gathered;falseotherwise
-
-
-
-