Package 

Interface StreamClientListener


  • 
    public interface StreamClientListener
    
                        

    Listener interface for Feeds socket events.

    This interface defines methods to handle socket state changes and events. Implement this interface to receive updates about the socket connection state and incoming events.

    • Method Summary

      Modifier and Type Method Description
      Unit onState(StreamConnectionState state) Called when the socket connection state changes.
      Unit onEvent(Object event) Called when a new event is received from the socket.
      Unit onError(Throwable err) Called when an error occurs on the client.
      Unit onRecovery(Recovery recovery) Called when a recovery decision is made.
      • Methods inherited from class java.lang.Object

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

      • onState

         Unit onState(StreamConnectionState state)

        Called when the socket connection state changes.

        Parameters:
        state - The new state of the WebSocket connection.
      • onEvent

         Unit onEvent(Object event)

        Called when a new event is received from the socket.

        Parameters:
        event - The event received from the WebSocket.
      • onError

         Unit onError(Throwable err)

        Called when an error occurs on the client.

        Parameters:
        err - The error that occurred.
      • onRecovery

         Unit onRecovery(Recovery recovery)

        Called when a recovery decision is made.

        Parameters:
        recovery - The recovery decision.