Package 

Class SocketListener

  • All Implemented Interfaces:

    
    public class SocketListener
    
                        

    Listener which is invoked for WebSocket events.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
      SocketListener()
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit onConnecting() Invoked when the connection begins to establish and socket state changes to Connecting.
      Unit onConnected(ConnectedEvent event) Invoked when we receive the first ConnectedEvent in this connection.
      Unit onDisconnected(DisconnectCause cause) Invoked when the web socket connection is disconnected.
      Unit onError(ChatError error) Invoked when there is any error in this web socket connection.
      Unit onEvent(ChatEvent event) Invoked when we receive any successful event.
      • Methods inherited from class java.lang.Object

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

      • SocketListener

        SocketListener()
    • Method Detail

      • onConnecting

         Unit onConnecting()

        Invoked when the connection begins to establish and socket state changes to Connecting.

      • onError

         Unit onError(ChatError error)

        Invoked when there is any error in this web socket connection.

        Parameters:
        error - ChatError object with the error details.
      • onEvent

         Unit onEvent(ChatEvent event)

        Invoked when we receive any successful event.

        Parameters:
        event - parsed ChatEvent received in this web socket connection.