Package client

Interface WebSocketEventListener


public interface WebSocketEventListener
WebSocketEventListener - Interface for handling WebSocket events. Defines methods for message reception, connection status changes, and error handling.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when the WebSocket connection is established
    void
    Called when the WebSocket connection is closed
    void
    onError(String error)
    Called when an error occurs in the WebSocket connection
    void
    Called when a message is received over the WebSocket connection
    void
    updateUserList(String chatName, String[] activeUsers, ArrayList<String> inChatUsers)
    Called when a chat update occurs
  • Method Details

    • onMessageReceived

      void onMessageReceived(Message message)
      Called when a message is received over the WebSocket connection
    • onConnected

      void onConnected()
      Called when the WebSocket connection is established
    • onDisconnected

      void onDisconnected()
      Called when the WebSocket connection is closed
    • onError

      void onError(String error)
      Called when an error occurs in the WebSocket connection
    • updateUserList

      void updateUserList(String chatName, String[] activeUsers, ArrayList<String> inChatUsers)
      Called when a chat update occurs