Class ServerPushEndPoint

java.lang.Object
org.idempiere.ui.zk.websocket.ServerPushEndPoint

public class ServerPushEndPoint extends Object
web socket end point for server push
Author:
hengsin
  • Constructor Summary

    Constructors
    Constructor
    Description
    default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Message client to send echo event to server
    boolean
     
    void
    onClose(javax.websocket.Session sess)
    Unregister this endpoint when its WebSocket session closes.
    void
    onError(javax.websocket.Session sess, Throwable throwable)
    Log an error raised by the WebSocket container.
    void
    onMessage(javax.websocket.Session session, String message)
    Handle ping from client
    void
    onOpen(javax.websocket.Session sess, javax.websocket.EndpointConfig config, String dtid)
    Initialize the endpoint with the node-local connector URI captured for the desktop.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerPushEndPoint

      public ServerPushEndPoint()
      default constructor
  • Method Details

    • onClose

      public void onClose(javax.websocket.Session sess) throws IOException
      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 session
      config - endpoint configuration populated during the handshake
      dtid - ZK desktop identifier
      Throws:
      IOException - if endpoint initialization fails
    • onError

      public void onError(javax.websocket.Session sess, Throwable throwable)
      Log an error raised by the WebSocket container.
      Parameters:
      sess - WebSocket session
      throwable - reported error
    • onMessage

      public void onMessage(javax.websocket.Session session, String message)
      Handle ping from client
      Parameters:
      session -
      message -
    • echo

      public void echo()
      Message client to send echo event to server
    • getAndResetMessageIndicator

      public boolean getAndResetMessageIndicator()