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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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 boolean isGathered(ChannelType type) Returns whether a channel type is displayed in aggregated (gathered) mode.
      boolean isGathered(ChannelIdentifier identifier) Returns whether the channel identified by the given identifier is displayed in aggregated mode.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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:

        true if the type is gathered; false otherwise

      • isGathered

         boolean isGathered(ChannelIdentifier identifier)

        Returns whether the channel identified by the given identifier is displayed in aggregated mode.

        Parameters:
        identifier - channel identifier
        Returns:

        true if the channel type is gathered; false otherwise