Package org.idempiere.ui.zk.websocket
Class ServerPushEndPoint
java.lang.Object
org.idempiere.ui.zk.websocket.ServerPushEndPoint
web socket end point for server push
- Author:
- hengsin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidecho()Message client to send echo event to serverbooleanvoidonClose(javax.websocket.Session sess) Unregister this endpoint when its WebSocket session closes.voidLog an error raised by the WebSocket container.voidHandle ping from clientvoidInitialize the endpoint with the node-local connector URI captured for the desktop.
-
Constructor Details
-
ServerPushEndPoint
public ServerPushEndPoint()default constructor
-
-
Method Details
-
onClose
Unregister this endpoint when its WebSocket session closes.- Parameters:
sess- WebSocket session- Throws:
IOException- if closing the endpoint fails
-
onOpen
public void onOpen(javax.websocket.Session sess, javax.websocket.EndpointConfig config, String dtid) throws IOException Initialize the endpoint with the node-local connector URI captured for the desktop.- Parameters:
sess- WebSocket sessionconfig- endpoint configuration populated during the handshakedtid- ZK desktop identifier- Throws:
IOException- if endpoint initialization fails
-
onError
Log an error raised by the WebSocket container.- Parameters:
sess- WebSocket sessionthrowable- reported error
-
onMessage
Handle ping from client- Parameters:
session-message-
-
echo
public void echo()Message client to send echo event to server -
getAndResetMessageIndicator
public boolean getAndResetMessageIndicator()
-