Uses of Class
com.neovisionaries.ws.client.WebSocket
-
-
Uses of WebSocket in com.neovisionaries.ws.client
Fields in com.neovisionaries.ws.client declared as WebSocket Modifier and Type Field Description private WebSocket
Connectable. mWebSocket
private WebSocket
HandshakeReader. mWebSocket
private WebSocket
ListenerManager. mWebSocket
private WebSocket
PeriodicalFrameSender. mWebSocket
protected WebSocket
WebSocketThread. mWebSocket
Methods in com.neovisionaries.ws.client that return WebSocket Modifier and Type Method Description WebSocket
WebSocket. addExtension(WebSocketExtension extension)
Add a value forSec-WebSocket-Extension
.WebSocket
WebSocket. addExtension(java.lang.String extension)
Add a value forSec-WebSocket-Extension
.WebSocket
WebSocket. addHeader(java.lang.String name, java.lang.String value)
Add a pair of extra HTTP header.WebSocket
WebSocket. addListener(WebSocketListener listener)
Add a listener to receive events on this WebSocket.WebSocket
WebSocket. addListeners(java.util.List<WebSocketListener> listeners)
Add listeners.WebSocket
WebSocket. addProtocol(java.lang.String protocol)
Add a value forSec-WebSocket-Protocol
.WebSocket
Connectable. call()
WebSocket
WebSocket. clearExtensions()
Remove all extensions fromSec-WebSocket-Extension
.WebSocket
WebSocket. clearHeaders()
Clear all extra HTTP headers.WebSocket
WebSocket. clearListeners()
Remove all the listeners from this WebSocket.WebSocket
WebSocket. clearProtocols()
Remove all protocols fromSec-WebSocket-Protocol
.WebSocket
WebSocket. clearUserInfo()
Clear the credentials to connect to the WebSocket endpoint.WebSocket
WebSocket. connect()
Connect to the server, send an opening handshake to the server, receive the response and then start threads to communicate with the server.WebSocket
WebSocket. connectAsynchronously()
Executeconnect()
asynchronously by creating a new thread and callingconnect()
in the thread.WebSocket
WebSocketFactory. createSocket(java.lang.String uri)
Create a WebSocket.WebSocket
WebSocketFactory. createSocket(java.lang.String uri, int timeout)
Create a WebSocket.private WebSocket
WebSocketFactory. createSocket(java.lang.String scheme, java.lang.String userInfo, java.lang.String host, int port, java.lang.String path, java.lang.String query, int timeout)
WebSocket
WebSocketFactory. createSocket(java.net.URI uri)
Create a WebSocket.WebSocket
WebSocketFactory. createSocket(java.net.URI uri, int timeout)
Create a WebSocket.WebSocket
WebSocketFactory. createSocket(java.net.URL url)
Create a WebSocket.WebSocket
WebSocketFactory. createSocket(java.net.URL url, int timeout)
Create a WebSocket.private WebSocket
WebSocketFactory. createWebSocket(boolean secure, java.lang.String userInfo, java.lang.String host, int port, java.lang.String path, java.lang.String query, SocketConnector connector)
WebSocket
WebSocket. disconnect()
Disconnect the WebSocket.WebSocket
WebSocket. disconnect(int closeCode)
Disconnect the WebSocket.WebSocket
WebSocket. disconnect(int closeCode, java.lang.String reason)
Disconnect the WebSocket.WebSocket
WebSocket. disconnect(int closeCode, java.lang.String reason, long closeDelay)
Disconnect the WebSocket.WebSocket
WebSocket. disconnect(java.lang.String reason)
Disconnect the WebSocket.WebSocket
WebSocket. flush()
Flush frames to the server.WebSocket
WebSocket. recreate()
Create a newWebSocket
instance that has the same settings as this instance.WebSocket
WebSocket. recreate(int timeout)
Create a newWebSocket
instance that has the same settings as this instance.WebSocket
WebSocket. removeExtension(WebSocketExtension extension)
Remove an extension fromSec-WebSocket-Extension
.WebSocket
WebSocket. removeExtensions(java.lang.String name)
Remove extensions fromSec-WebSocket-Extension
by an extension name.WebSocket
WebSocket. removeHeaders(java.lang.String name)
Remove pairs of extra HTTP headers.WebSocket
WebSocket. removeListener(WebSocketListener listener)
Remove a listener from this WebSocket.WebSocket
WebSocket. removeListeners(java.util.List<WebSocketListener> listeners)
Remove listeners.WebSocket
WebSocket. removeProtocol(java.lang.String protocol)
Remove a protocol fromSec-WebSocket-Protocol
.WebSocket
WebSocket. sendBinary(byte[] message)
Send a binary message to the server.WebSocket
WebSocket. sendBinary(byte[] payload, boolean fin)
Send a binary frame to the server.WebSocket
WebSocket. sendClose()
Send a close frame to the server.WebSocket
WebSocket. sendClose(int closeCode)
Send a close frame to the server.WebSocket
WebSocket. sendClose(int closeCode, java.lang.String reason)
Send a close frame to the server.WebSocket
WebSocket. sendContinuation()
Send a continuation frame to the server.WebSocket
WebSocket. sendContinuation(boolean fin)
Send a continuation frame to the server.WebSocket
WebSocket. sendContinuation(byte[] payload)
Send a continuation frame to the server.WebSocket
WebSocket. sendContinuation(byte[] payload, boolean fin)
Send a continuation frame to the server.WebSocket
WebSocket. sendContinuation(java.lang.String payload)
Send a continuation frame to the server.WebSocket
WebSocket. sendContinuation(java.lang.String payload, boolean fin)
Send a continuation frame to the server.WebSocket
WebSocket. sendFrame(WebSocketFrame frame)
Send a WebSocket frame to the server.WebSocket
WebSocket. sendPing()
Send a ping frame to the server.WebSocket
WebSocket. sendPing(byte[] payload)
Send a ping frame to the server.WebSocket
WebSocket. sendPing(java.lang.String payload)
Send a ping frame to the server.WebSocket
WebSocket. sendPong()
Send a pong frame to the server.WebSocket
WebSocket. sendPong(byte[] payload)
Send a pong frame to the server.WebSocket
WebSocket. sendPong(java.lang.String payload)
Send a pong frame to the server.WebSocket
WebSocket. sendText(java.lang.String message)
Send a text message to the server.WebSocket
WebSocket. sendText(java.lang.String payload, boolean fin)
Send a text frame to the server.WebSocket
WebSocket. setAutoFlush(boolean auto)
Enable or disable auto-flush of sent frames.WebSocket
WebSocket. setDirectTextMessage(boolean direct)
Set whether to receive text messages directly as byte arrays without string conversion.WebSocket
WebSocket. setExtended(boolean extended)
Allow or disallow extended use of WebSocket frames.WebSocket
WebSocket. setFrameQueueSize(int size)
Set the size of the frame queue.WebSocket
WebSocket. setMaxPayloadSize(int size)
Set the maximum payload size.WebSocket
WebSocket. setMissingCloseFrameAllowed(boolean allowed)
Set whether to allow the server to close the WebSocket connection without sending a close frame to this client.WebSocket
WebSocket. setPingInterval(long interval)
Set the interval of periodical ping frames.WebSocket
WebSocket. setPingPayloadGenerator(PayloadGenerator generator)
Set the generator of payload of ping frames that are sent automatically.WebSocket
WebSocket. setPingSenderName(java.lang.String name)
Set the name of theTimer
that sends ping frames periodically.WebSocket
WebSocket. setPongInterval(long interval)
Set the interval of periodical pong frames.WebSocket
WebSocket. setPongPayloadGenerator(PayloadGenerator generator)
Set the generator of payload of pong frames that are sent automatically.WebSocket
WebSocket. setPongSenderName(java.lang.String name)
Set the name of theTimer
that sends pong frames periodically.WebSocket
WebSocket. setUserInfo(java.lang.String userInfo)
Set the credentials to connect to the WebSocket endpoint.WebSocket
WebSocket. setUserInfo(java.lang.String id, java.lang.String password)
Set the credentials to connect to the WebSocket endpoint.Methods in com.neovisionaries.ws.client that return types with arguments of type WebSocket Modifier and Type Method Description java.util.concurrent.Future<WebSocket>
WebSocket. connect(java.util.concurrent.ExecutorService executorService)
Executeconnect()
asynchronously using the givenExecutorService
.java.util.concurrent.Callable<WebSocket>
WebSocket. connectable()
Methods in com.neovisionaries.ws.client with parameters of type WebSocket Modifier and Type Method Description void
WebSocketAdapter. handleCallbackError(WebSocket websocket, java.lang.Throwable cause)
void
WebSocketListener. handleCallbackError(WebSocket websocket, java.lang.Throwable cause)
Called when anonXxx()
method threw aThrowable
.void
WebSocketAdapter. onBinaryFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onBinaryFrame(WebSocket websocket, WebSocketFrame frame)
Called when a binary frame (opcode = 0x2) was received.void
WebSocketAdapter. onBinaryMessage(WebSocket websocket, byte[] binary)
void
WebSocketListener. onBinaryMessage(WebSocket websocket, byte[] binary)
Called when a binary message was received.void
WebSocketAdapter. onCloseFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onCloseFrame(WebSocket websocket, WebSocketFrame frame)
Called when a close frame (opcode = 0x8) was received.void
WebSocketAdapter. onConnected(WebSocket websocket, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
void
WebSocketListener. onConnected(WebSocket websocket, java.util.Map<java.lang.String,java.util.List<java.lang.String>> headers)
Called after the opening handshake of the WebSocket connection succeeded.void
WebSocketAdapter. onConnectError(WebSocket websocket, WebSocketException exception)
void
WebSocketListener. onConnectError(WebSocket websocket, WebSocketException cause)
Called whenconnectAsynchronously()
failed.void
WebSocketAdapter. onContinuationFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onContinuationFrame(WebSocket websocket, WebSocketFrame frame)
Called when a continuation frame (opcode = 0x0) was received.void
WebSocketAdapter. onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer)
void
WebSocketListener. onDisconnected(WebSocket websocket, WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame, boolean closedByServer)
Called after the WebSocket connection was closed.void
WebSocketAdapter. onError(WebSocket websocket, WebSocketException cause)
void
WebSocketListener. onError(WebSocket websocket, WebSocketException cause)
Call when an error occurred.void
WebSocketAdapter. onFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onFrame(WebSocket websocket, WebSocketFrame frame)
Called when a frame was received.void
WebSocketAdapter. onFrameError(WebSocket websocket, WebSocketException cause, WebSocketFrame frame)
void
WebSocketListener. onFrameError(WebSocket websocket, WebSocketException cause, WebSocketFrame frame)
Called when a WebSocket frame failed to be read from the WebSocket.void
WebSocketAdapter. onFrameSent(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onFrameSent(WebSocket websocket, WebSocketFrame frame)
Called when a WebSocket frame was sent to the server (but not flushed yet).void
WebSocketAdapter. onFrameUnsent(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onFrameUnsent(WebSocket websocket, WebSocketFrame frame)
Called when a WebSocket frame was not sent to the server because a close frame has already been sent.void
WebSocketAdapter. onMessageDecompressionError(WebSocket websocket, WebSocketException cause, byte[] compressed)
void
WebSocketListener. onMessageDecompressionError(WebSocket websocket, WebSocketException cause, byte[] compressed)
Called when a message failed to be decompressed.void
WebSocketAdapter. onMessageError(WebSocket websocket, WebSocketException cause, java.util.List<WebSocketFrame> frames)
void
WebSocketListener. onMessageError(WebSocket websocket, WebSocketException cause, java.util.List<WebSocketFrame> frames)
Called when it failed to concatenate payloads of multiple frames to construct a message.void
WebSocketAdapter. onPingFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onPingFrame(WebSocket websocket, WebSocketFrame frame)
Called when a ping frame (opcode = 0x9) was received.void
WebSocketAdapter. onPongFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onPongFrame(WebSocket websocket, WebSocketFrame frame)
Called when a pong frame (opcode = 0xA) was received.void
WebSocketAdapter. onSendError(WebSocket websocket, WebSocketException cause, WebSocketFrame frame)
void
WebSocketListener. onSendError(WebSocket websocket, WebSocketException cause, WebSocketFrame frame)
Called when an error occurred when a frame was tried to be sent to the server.void
WebSocketAdapter. onSendingFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onSendingFrame(WebSocket websocket, WebSocketFrame frame)
Called before a WebSocket frame is sent.void
WebSocketAdapter. onSendingHandshake(WebSocket websocket, java.lang.String requestLine, java.util.List<java.lang.String[]> headers)
void
WebSocketListener. onSendingHandshake(WebSocket websocket, java.lang.String requestLine, java.util.List<java.lang.String[]> headers)
Called before an opening handshake is sent to the server.void
WebSocketAdapter. onStateChanged(WebSocket websocket, WebSocketState newState)
void
WebSocketListener. onStateChanged(WebSocket websocket, WebSocketState newState)
Called after the state of the WebSocket changed.void
WebSocketAdapter. onTextFrame(WebSocket websocket, WebSocketFrame frame)
void
WebSocketListener. onTextFrame(WebSocket websocket, WebSocketFrame frame)
Called when a text frame (opcode = 0x1) was received.void
WebSocketAdapter. onTextMessage(WebSocket websocket, byte[] data)
void
WebSocketAdapter. onTextMessage(WebSocket websocket, java.lang.String text)
void
WebSocketListener. onTextMessage(WebSocket websocket, byte[] data)
Called when a text message was received instead ofWebSocketListener.onTextMessage(WebSocket, String)
whenisDirectTextMessage()
returnstrue
.void
WebSocketListener. onTextMessage(WebSocket websocket, java.lang.String text)
Called when a text message was received.void
WebSocketAdapter. onTextMessageError(WebSocket websocket, WebSocketException cause, byte[] data)
void
WebSocketListener. onTextMessageError(WebSocket websocket, WebSocketException cause, byte[] data)
Called when it failed to convert payload data into a string.void
WebSocketAdapter. onThreadCreated(WebSocket websocket, ThreadType threadType, java.lang.Thread thread)
void
WebSocketListener. onThreadCreated(WebSocket websocket, ThreadType threadType, java.lang.Thread thread)
Called between after a thread is created and before the thread'sstart()
method is called.void
WebSocketAdapter. onThreadStarted(WebSocket websocket, ThreadType threadType, java.lang.Thread thread)
void
WebSocketListener. onThreadStarted(WebSocket websocket, ThreadType threadType, java.lang.Thread thread)
Called at the very beginning of the thread'srun()
method implementation.void
WebSocketAdapter. onThreadStopping(WebSocket websocket, ThreadType threadType, java.lang.Thread thread)
void
WebSocketListener. onThreadStopping(WebSocket websocket, ThreadType threadType, java.lang.Thread thread)
Called at the very end of the thread'srun()
method implementation.void
WebSocketAdapter. onUnexpectedError(WebSocket websocket, WebSocketException cause)
void
WebSocketListener. onUnexpectedError(WebSocket websocket, WebSocketException cause)
Called when an uncaught throwable was detected in either the reading thread (which reads frames from the server) or the writing thread (which sends frames to the server).Constructors in com.neovisionaries.ws.client with parameters of type WebSocket Constructor Description Connectable(WebSocket ws)
ConnectThread(WebSocket ws)
FinishThread(WebSocket ws)
HandshakeReader(WebSocket websocket)
ListenerManager(WebSocket websocket)
PeriodicalFrameSender(WebSocket webSocket, java.lang.String timerName, PayloadGenerator generator)
PingSender(WebSocket webSocket, PayloadGenerator generator)
PongSender(WebSocket webSocket, PayloadGenerator generator)
ReadingThread(WebSocket websocket)
WebSocketThread(java.lang.String name, WebSocket ws, ThreadType type)
WritingThread(WebSocket websocket)
-