Class WSClient

  • All Implemented Interfaces:
    AutoCloseable

    @Singleton
    public class WSClient
    extends okhttp3.WebSocketListener
    implements AutoCloseable
    • Method Detail

      • sessionExists

        public boolean sessionExists()
      • changeSession

        public void changeSession​(UUID sessionId)
      • onOpen

        public void onOpen​(okhttp3.WebSocket webSocket,
                           okhttp3.Response response)
        Overrides:
        onOpen in class okhttp3.WebSocketListener
      • onMessage

        public void onMessage​(okhttp3.WebSocket webSocket,
                              okio.ByteString bytes)
        Overrides:
        onMessage in class okhttp3.WebSocketListener
      • onClosed

        public void onClosed​(okhttp3.WebSocket webSocket,
                             int code,
                             String reason)
        Overrides:
        onClosed in class okhttp3.WebSocketListener
      • onFailure

        public void onFailure​(okhttp3.WebSocket webSocket,
                              Throwable t,
                              okhttp3.Response response)
        Overrides:
        onFailure in class okhttp3.WebSocketListener
      • getSessionId

        public UUID getSessionId()