public class WebSocketUtils
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
WebSocketUtils.JsonObject |
Constructor and Description |
---|
WebSocketUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
broadcast(java.lang.String msg)
Sends a message to all users.
|
static void |
close(javax.websocket.Session session) |
static void |
delay(java.lang.Runnable r,
long delay) |
static void |
delayedSend(java.lang.String msg,
GeneralNegotiator user,
int delay) |
static GeneralNegotiator |
getUser(javax.websocket.Session session) |
static GeneralNegotiator |
getVH(javax.websocket.Session session) |
static void |
newUser(GeneralNegotiator user) |
static void |
newVH(GeneralVH user) |
static void |
send(java.lang.String msg,
GeneralNegotiator user)
Sends a message to the specified user.
|
static void |
send(java.lang.String msg,
javax.websocket.Session session)
Sends a message via websocket according to the appropriate websocket session.
|
public static void send(java.lang.String msg, javax.websocket.Session session)
msg
- session
- public static void send(java.lang.String msg, GeneralNegotiator user)
msg
- user
- public static void broadcast(java.lang.String msg)
msg
- public static GeneralNegotiator getUser(javax.websocket.Session session)
public static void delay(java.lang.Runnable r, long delay)
public static void delayedSend(java.lang.String msg, GeneralNegotiator user, int delay)
public static void close(javax.websocket.Session session)
public static void newUser(GeneralNegotiator user)
public static void newVH(GeneralVH user)
public static GeneralNegotiator getVH(javax.websocket.Session session)