Package tools.dynamia.zk.websocket
Class WebSocketPushSender
- java.lang.Object
-
- tools.dynamia.zk.websocket.WebSocketPushSender
-
public abstract class WebSocketPushSender extends Object
Helper class to send push command to desktop cliente using web socket
-
-
Constructor Summary
Constructors Constructor Description WebSocketPushSender()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbroadcastCommand(String command)Send a push command to all connected sessionsstatic voidinitWS()Init WS connection with clientstatic booleansendPushCommand(String command)Send a push command to current client desktop.static booleansendPushCommand(org.zkoss.zk.ui.Desktop desktop, String command)Send a push command to client desktop.
-
-
-
Method Detail
-
sendPushCommand
public static boolean sendPushCommand(org.zkoss.zk.ui.Desktop desktop, String command)Send a push command to client desktop. The command its returned to the server as a ZK Global Command. You should have a ViemModel that receive this global command- Parameters:
desktop-command-- Returns:
- true if command is sended successfull. Check log for false response
-
sendPushCommand
public static boolean sendPushCommand(String command)
Send a push command to current client desktop. The command its returned to the server as a ZK Global Command. You should have a ViemModel that receive this global command- Parameters:
command-- Returns:
- true if command is sended successfull. Check log for false response
-
broadcastCommand
public static void broadcastCommand(String command)
Send a push command to all connected sessions- Parameters:
command-
-
initWS
public static void initWS()
Init WS connection with client
-
-