Interface WebSocketListener

  • All Implemented Interfaces:

    
    public interface WebSocketListener
    
                        

    A listener 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
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit onWebSocketClosed(Throwable cause) Called after the websocket is closed.
      Unit onWebSocketError(Throwable exception) Called if some exception is thrown by the websocket client.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • onWebSocketClosed

         Unit onWebSocketClosed(Throwable cause)

        Called after the websocket is closed.

        In case of a normal closure, the cause argument is null. The cause is non-null if the closure of the websocket is due to an exception in the STOMP client (STOMP error frame, unexpected websocket close frame, missing heart-beat, decoding errors, etc.).

        Note that this callback is not called if the websocket itself failed with an exception. In that case, onWebSocketError is called instead.

      • onWebSocketError

         Unit onWebSocketError(Throwable exception)

        Called if some exception is thrown by the websocket client.