public class WebSocketClient
extends com.neovisionaries.ws.client.WebSocketAdapter
Constructor and Description |
---|
WebSocketClient(java.lang.String url,
JDAImpl api,
org.apache.http.HttpHost proxy) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
handleCallbackError(com.neovisionaries.ws.client.WebSocket websocket,
java.lang.Throwable cause) |
boolean |
isConnected() |
void |
onBinaryMessage(com.neovisionaries.ws.client.WebSocket websocket,
byte[] binary) |
void |
onConnected(com.neovisionaries.ws.client.WebSocket websocket,
java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers) |
void |
onDisconnected(com.neovisionaries.ws.client.WebSocket websocket,
com.neovisionaries.ws.client.WebSocketFrame serverCloseFrame,
com.neovisionaries.ws.client.WebSocketFrame clientCloseFrame,
boolean closedByServer) |
void |
onTextMessage(com.neovisionaries.ws.client.WebSocket websocket,
java.lang.String message) |
void |
onUnexpectedError(com.neovisionaries.ws.client.WebSocket websocket,
com.neovisionaries.ws.client.WebSocketException cause) |
void |
ready() |
void |
send(java.lang.String message) |
onBinaryFrame, onCloseFrame, onConnectError, onContinuationFrame, onError, onFrame, onFrameError, onFrameSent, onFrameUnsent, onMessageDecompressionError, onMessageError, onPingFrame, onPongFrame, onSendError, onSendingFrame, onStateChanged, onTextFrame, onTextMessageError
public WebSocketClient(java.lang.String url, JDAImpl api, org.apache.http.HttpHost proxy)
public void send(java.lang.String message)
public void onConnected(com.neovisionaries.ws.client.WebSocket websocket, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
onConnected
in interface com.neovisionaries.ws.client.WebSocketListener
onConnected
in class com.neovisionaries.ws.client.WebSocketAdapter
public void onTextMessage(com.neovisionaries.ws.client.WebSocket websocket, java.lang.String message)
onTextMessage
in interface com.neovisionaries.ws.client.WebSocketListener
onTextMessage
in class com.neovisionaries.ws.client.WebSocketAdapter
public void onBinaryMessage(com.neovisionaries.ws.client.WebSocket websocket, byte[] binary) throws java.io.UnsupportedEncodingException, java.util.zip.DataFormatException
onBinaryMessage
in interface com.neovisionaries.ws.client.WebSocketListener
onBinaryMessage
in class com.neovisionaries.ws.client.WebSocketAdapter
java.io.UnsupportedEncodingException
java.util.zip.DataFormatException
public void onDisconnected(com.neovisionaries.ws.client.WebSocket websocket, com.neovisionaries.ws.client.WebSocketFrame serverCloseFrame, com.neovisionaries.ws.client.WebSocketFrame clientCloseFrame, boolean closedByServer)
onDisconnected
in interface com.neovisionaries.ws.client.WebSocketListener
onDisconnected
in class com.neovisionaries.ws.client.WebSocketAdapter
public void onUnexpectedError(com.neovisionaries.ws.client.WebSocket websocket, com.neovisionaries.ws.client.WebSocketException cause)
onUnexpectedError
in interface com.neovisionaries.ws.client.WebSocketListener
onUnexpectedError
in class com.neovisionaries.ws.client.WebSocketAdapter
public void handleCallbackError(com.neovisionaries.ws.client.WebSocket websocket, java.lang.Throwable cause)
handleCallbackError
in interface com.neovisionaries.ws.client.WebSocketListener
handleCallbackError
in class com.neovisionaries.ws.client.WebSocketAdapter
public void close()
public boolean isConnected()
public void ready()