Class SingleDataHandler

  • All Implemented Interfaces:

    
    public abstract class SingleDataHandler<T>
    extends BaseHandler
                        

    Business logic handler with single-type data change callbacks.

    Since:

    5.10.4

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected volatile boolean isAlive
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void stop() Stops the handler.
      final void addDataChangeListener(@NonNull() OnDataChangeListener<T> onDataChangeListener) Adds a data change listener.
      final void replaceDataChangeListener(@NonNull() OnDataChangeListener<T> onDataChangeListener) Replaces the data change listener.
      final void notifyDataChange(@NonNull() T t) Notifies data change.
      final void notifyDataError(@NonNull() NCError error) Notifies a data error.
      • Methods inherited from class ai.nexconn.chatui.base.BaseHandler

        isAlive
      • Methods inherited from class java.lang.Object

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

      • SingleDataHandler

        SingleDataHandler()
    • Method Detail

      • stop

         void stop()

        Stops the handler.

      • notifyDataChange

         final void notifyDataChange(@NonNull() T t)

        Notifies data change.

        Parameters:
        t - the data
      • notifyDataError

         final void notifyDataError(@NonNull() NCError error)

        Notifies a data error.

        Parameters:
        error - the error