Uses of Interface
org.java_websocket.WebSocket
-
Packages that use WebSocket Package Description com.basiscomponents.comm org.java_websocket org.java_websocket.client This package encapsulates all implementations in relation with the WebSocketClient.org.java_websocket.server This package encapsulates all implementations in relation with the WebSocketServer. -
-
Uses of WebSocket in com.basiscomponents.comm
Methods in com.basiscomponents.comm with parameters of type WebSocket Modifier and Type Method Description void
WsServer. onClose(WebSocket conn, int code, String reason, boolean remote)
void
WsServer. onError(WebSocket conn, Exception ex)
void
WsServer. onMessage(WebSocket conn, String message)
void
WsServer. onMessage(WebSocket conn, ByteBuffer message)
void
WsServer. onOpen(WebSocket conn, ClientHandshake handshake)
-
Uses of WebSocket in org.java_websocket
Classes in org.java_websocket that implement WebSocket Modifier and Type Class Description class
WebSocketImpl
Represents one end (client or server) of a single WebSocketImpl connection.Methods in org.java_websocket that return WebSocket Modifier and Type Method Description WebSocket
WebSocketFactory. createWebSocket(WebSocketAdapter a, List<Draft> drafts)
Create a new Websocket with the provided listener, drafts and socketWebSocket
WebSocketFactory. createWebSocket(WebSocketAdapter a, Draft d)
Create a new Websocket with the provided listener, drafts and socketMethods in org.java_websocket that return types with arguments of type WebSocket Modifier and Type Method Description protected abstract Collection<WebSocket>
AbstractWebSocket. getConnections()
Getter to get all the currently available connectionsMethods in org.java_websocket with parameters of type WebSocket Modifier and Type Method Description InetSocketAddress
WebSocketListener. getLocalSocketAddress(WebSocket conn)
InetSocketAddress
WebSocketListener. getRemoteSocketAddress(WebSocket conn)
void
WebSocketListener. onWebsocketClose(WebSocket ws, int code, String reason, boolean remote)
Called after WebSocket#close is explicity called, or when the other end of the WebSocket connection is closed.void
WebSocketListener. onWebsocketCloseInitiated(WebSocket ws, int code, String reason)
send when this peer sends a close handshakevoid
WebSocketListener. onWebsocketClosing(WebSocket ws, int code, String reason, boolean remote)
Called as soon as no further frames are acceptedvoid
WebSocketListener. onWebsocketError(WebSocket conn, Exception ex)
Called if an exception worth noting occurred.void
WebSocketAdapter. onWebsocketHandshakeReceivedAsClient(WebSocket conn, ClientHandshake request, ServerHandshake response)
void
WebSocketListener. onWebsocketHandshakeReceivedAsClient(WebSocket conn, ClientHandshake request, ServerHandshake response)
Called on the client side when the socket connection is first established, and the WebSocketImpl handshake response has been received.ServerHandshakeBuilder
WebSocketAdapter. onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft, ClientHandshake request)
This default implementation does not do anything.ServerHandshakeBuilder
WebSocketListener. onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft, ClientHandshake request)
Called on the server side when the socket connection is first established, and the WebSocket handshake has been received.void
WebSocketAdapter. onWebsocketHandshakeSentAsClient(WebSocket conn, ClientHandshake request)
This default implementation does not do anything which will cause the connections to always progress.void
WebSocketListener. onWebsocketHandshakeSentAsClient(WebSocket conn, ClientHandshake request)
Called on the client side when the socket connection is first established, and the WebSocketImpl handshake has just been sent.void
WebSocketListener. onWebsocketMessage(WebSocket conn, String message)
Called when an entire text frame has been received.void
WebSocketListener. onWebsocketMessage(WebSocket conn, ByteBuffer blob)
Called when an entire binary frame has been received.void
WebSocketAdapter. onWebsocketMessageFragment(WebSocket conn, Framedata frame)
Deprecated.void
WebSocketListener. onWebsocketMessageFragment(WebSocket conn, Framedata frame)
Deprecated.void
WebSocketListener. onWebsocketOpen(WebSocket conn, Handshakedata d)
Called after onHandshakeReceived returns true.void
WebSocketAdapter. onWebsocketPing(WebSocket conn, Framedata f)
This default implementation will send a pong in response to the received ping.void
WebSocketListener. onWebsocketPing(WebSocket conn, Framedata f)
Called a ping frame has been received.void
WebSocketAdapter. onWebsocketPong(WebSocket conn, Framedata f)
This default implementation does not do anything.void
WebSocketListener. onWebsocketPong(WebSocket conn, Framedata f)
Called when a pong frame is received.void
WebSocketListener. onWriteDemand(WebSocket conn)
This method is used to inform the selector thread that there is data queued to be written to the socket. -
Uses of WebSocket in org.java_websocket.client
Classes in org.java_websocket.client that implement WebSocket Modifier and Type Class Description class
WebSocketClient
A subclass must implement at least onOpen, onClose, and onMessage to be useful.Methods in org.java_websocket.client that return WebSocket Modifier and Type Method Description WebSocket
WebSocketClient. getConnection()
Getter for the engineMethods in org.java_websocket.client that return types with arguments of type WebSocket Modifier and Type Method Description protected Collection<WebSocket>
WebSocketClient. getConnections()
Methods in org.java_websocket.client with parameters of type WebSocket Modifier and Type Method Description InetSocketAddress
WebSocketClient. getLocalSocketAddress(WebSocket conn)
InetSocketAddress
WebSocketClient. getRemoteSocketAddress(WebSocket conn)
void
WebSocketClient. onWebsocketClose(WebSocket conn, int code, String reason, boolean remote)
Calls subclass' implementation of onClose.void
WebSocketClient. onWebsocketCloseInitiated(WebSocket conn, int code, String reason)
void
WebSocketClient. onWebsocketClosing(WebSocket conn, int code, String reason, boolean remote)
void
WebSocketClient. onWebsocketError(WebSocket conn, Exception ex)
Calls subclass' implementation of onIOError.void
WebSocketClient. onWebsocketMessage(WebSocket conn, String message)
Calls subclass' implementation of onMessage.void
WebSocketClient. onWebsocketMessage(WebSocket conn, ByteBuffer blob)
void
WebSocketClient. onWebsocketMessageFragment(WebSocket conn, Framedata frame)
void
WebSocketClient. onWebsocketOpen(WebSocket conn, Handshakedata handshake)
Calls subclass' implementation of onOpen.void
WebSocketClient. onWriteDemand(WebSocket conn)
-
Uses of WebSocket in org.java_websocket.server
Methods in org.java_websocket.server that return types with arguments of type WebSocket Modifier and Type Method Description Collection<WebSocket>
WebSocketServer. connections()
Deprecated.Collection<WebSocket>
WebSocketServer. getConnections()
Returns all currently connected clients.Methods in org.java_websocket.server with parameters of type WebSocket Modifier and Type Method Description protected boolean
WebSocketServer. addConnection(WebSocket ws)
protected void
WebSocketServer. allocateBuffers(WebSocket c)
InetSocketAddress
WebSocketServer. getLocalSocketAddress(WebSocket conn)
InetSocketAddress
WebSocketServer. getRemoteSocketAddress(WebSocket conn)
abstract void
WebSocketServer. onClose(WebSocket conn, int code, String reason, boolean remote)
Called after the websocket connection has been closed.void
WebSocketServer. onCloseInitiated(WebSocket conn, int code, String reason)
void
WebSocketServer. onClosing(WebSocket conn, int code, String reason, boolean remote)
abstract void
WebSocketServer. onError(WebSocket conn, Exception ex)
Called when errors occurs.void
WebSocketServer. onFragment(WebSocket conn, Framedata fragment)
Deprecated.abstract void
WebSocketServer. onMessage(WebSocket conn, String message)
Callback for string messages received from the remote hostvoid
WebSocketServer. onMessage(WebSocket conn, ByteBuffer message)
Callback for binary messages received from the remote hostabstract void
WebSocketServer. onOpen(WebSocket conn, ClientHandshake handshake)
Called after an opening handshake has been performed and the given websocket is ready to be written on.void
WebSocketServer. onWebsocketClose(WebSocket conn, int code, String reason, boolean remote)
void
WebSocketServer. onWebsocketCloseInitiated(WebSocket conn, int code, String reason)
void
WebSocketServer. onWebsocketClosing(WebSocket conn, int code, String reason, boolean remote)
void
WebSocketServer. onWebsocketError(WebSocket conn, Exception ex)
ServerHandshakeBuilder
WebSocketServer. onWebsocketHandshakeReceivedAsServer(WebSocket conn, Draft draft, ClientHandshake request)
void
WebSocketServer. onWebsocketMessage(WebSocket conn, String message)
void
WebSocketServer. onWebsocketMessage(WebSocket conn, ByteBuffer blob)
void
WebSocketServer. onWebsocketMessageFragment(WebSocket conn, Framedata frame)
Deprecated.void
WebSocketServer. onWebsocketOpen(WebSocket conn, Handshakedata handshake)
void
WebSocketServer. onWriteDemand(WebSocket w)
protected void
WebSocketServer. releaseBuffers(WebSocket c)
protected boolean
WebSocketServer. removeConnection(WebSocket ws)
This method performs remove operations on the connection and therefore also gives control over whether the operation shall be synchronizedMethod parameters in org.java_websocket.server with type arguments of type WebSocket Modifier and Type Method Description void
WebSocketServer. broadcast(byte[] data, Collection<WebSocket> clients)
Send a byte array to a specific collection of websocket connectionsvoid
WebSocketServer. broadcast(String text, Collection<WebSocket> clients)
Send a text to a specific collection of websocket connectionsvoid
WebSocketServer. broadcast(ByteBuffer data, Collection<WebSocket> clients)
Send a ByteBuffer to a specific collection of websocket connectionsConstructor parameters in org.java_websocket.server with type arguments of type WebSocket Constructor Description WebSocketServer(InetSocketAddress address, int decodercount, List<Draft> drafts, Collection<WebSocket> connectionscontainer)
Creates a WebSocketServer that will attempt to bind/listen on the given address, and comply with Draft version draft.
-