Class RestWebSocket


  • public class RestWebSocket
    extends javax.websocket.Endpoint
    WebSocket server implementation. Opens web socket at an address and acts as bridge to Jadex. Allows for JavaScript usage of Jadex that comes close to Java programming.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.websocket.EndpointConfig config
      The endpoint configuration.
      protected AbstractWebSocketServer server
      The websocket server functionality.
    • Constructor Summary

      Constructors 
      Constructor Description
      RestWebSocket()
      Create a new rest websocket.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected javax.servlet.ServletContext getServletContext()
      Get the servlet context.
      void onClose​(javax.websocket.Session session, javax.websocket.CloseReason reason)  
      void onMessage​(java.lang.String txt, javax.websocket.Session session)  
      void onOpen​(javax.websocket.Session session, javax.websocket.EndpointConfig config)  
      • Methods inherited from class javax.websocket.Endpoint

        onError
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • config

        protected javax.websocket.EndpointConfig config
        The endpoint configuration.
    • Constructor Detail

      • RestWebSocket

        public RestWebSocket()
        Create a new rest websocket.
    • Method Detail

      • onOpen

        public void onOpen​(javax.websocket.Session session,
                           javax.websocket.EndpointConfig config)
        Specified by:
        onOpen in class javax.websocket.Endpoint
      • onMessage

        public void onMessage​(java.lang.String txt,
                              javax.websocket.Session session)
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • onClose

        public void onClose​(javax.websocket.Session session,
                            javax.websocket.CloseReason reason)
        Overrides:
        onClose in class javax.websocket.Endpoint
      • getServletContext

        protected javax.servlet.ServletContext getServletContext()
        Get the servlet context.
        Returns:
        The servlet context.