Package org.basex.http.ws
Class WsPool
java.lang.Object
org.basex.http.ws.WsPool
This class defines a pool for WebSockets. It manages all connected WebSockets.
- Author:
- BaseX Team 2005-21, BSD License, Johannes Finckh
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidSends a message to all connected clients except to the one with the given id.static voidSends a message to all connected clients.static WebSocketReturns the client with the specified id.static TokenListids()Returns the ids of all connected clients.static voidSends a message to a specific clients.
-
Method Details
-
ids
Returns the ids of all connected clients.- Returns:
- client ids
-
emit
Sends a message to all connected clients.- Parameters:
message- message- Throws:
QueryException- query exception
-
broadcast
Sends a message to all connected clients except to the one with the given id.- Parameters:
message- messageclient- client id- Throws:
QueryException- query exception
-
send
Sends a message to a specific clients.- Parameters:
message- messageids- client ids- Throws:
QueryException- query exception
-
get
Returns the client with the specified id.- Parameters:
id- client id- Returns:
- client
-