Package net.runelite.client.party
Class WSClient
- java.lang.Object
-
- okhttp3.WebSocketListener
-
- net.runelite.client.party.WSClient
-
- All Implemented Interfaces:
AutoCloseable
@Singleton public class WSClient extends okhttp3.WebSocketListener implements AutoCloseable
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeSession(UUID sessionId)
void
close()
UUID
getSessionId()
void
onClosed(okhttp3.WebSocket webSocket, int code, String reason)
void
onFailure(okhttp3.WebSocket webSocket, Throwable t, okhttp3.Response response)
void
onMessage(okhttp3.WebSocket webSocket, okio.ByteString bytes)
void
onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response)
void
registerMessage(Class<? extends WebsocketMessage> message)
boolean
sessionExists()
void
unregisterMessage(Class<? extends WebsocketMessage> message)
-
-
-
Method Detail
-
sessionExists
public boolean sessionExists()
-
changeSession
public void changeSession(UUID sessionId)
-
registerMessage
public void registerMessage(Class<? extends WebsocketMessage> message)
-
unregisterMessage
public void unregisterMessage(Class<? extends WebsocketMessage> message)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
onOpen
public void onOpen(okhttp3.WebSocket webSocket, okhttp3.Response response)
- Overrides:
onOpen
in classokhttp3.WebSocketListener
-
onMessage
public void onMessage(okhttp3.WebSocket webSocket, okio.ByteString bytes)
- Overrides:
onMessage
in classokhttp3.WebSocketListener
-
onClosed
public void onClosed(okhttp3.WebSocket webSocket, int code, String reason)
- Overrides:
onClosed
in classokhttp3.WebSocketListener
-
onFailure
public void onFailure(okhttp3.WebSocket webSocket, Throwable t, okhttp3.Response response)
- Overrides:
onFailure
in classokhttp3.WebSocketListener
-
getSessionId
public UUID getSessionId()
-
-