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)
      • registerMessage

        public void registerMessage​(Class<? extends net.runelite.http.api.ws.WebsocketMessage> message)
      • unregisterMessage

        public void unregisterMessage​(Class<? extends net.runelite.http.api.ws.WebsocketMessage> message)
      • send

        public void send​(net.runelite.http.api.ws.WebsocketMessage message)
      • onOpen

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

        public void onMessage​(okhttp3.WebSocket webSocket,
                              String text)
        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()