Class JettyWebsocketServer


  • @WebSocket
    public class JettyWebsocketServer
    extends java.lang.Object
    The websocket impl for jetty. Should be able to use the RestWebSocket class, but jetty complains that the websocket has to implement (jetty) WebsocketListener or use (jetty) @WebSocket annotion.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<org.eclipse.jetty.websocket.api.Session,​java.util.Map<java.lang.String,​java.lang.Object>> props
      The websockets per session.
      protected AbstractWebSocketServer server
      The websocket server functionality.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.Object> getUserProperties​(org.eclipse.jetty.websocket.api.Session session)  
      void onClose​(org.eclipse.jetty.websocket.api.Session session, int status, java.lang.String reason)  
      void onConnect​(org.eclipse.jetty.websocket.api.Session session)  
      void onError​(java.lang.Throwable error)  
      void onText​(org.eclipse.jetty.websocket.api.Session session, java.lang.String message)  
      • Methods inherited from class java.lang.Object

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

      • props

        protected java.util.Map<org.eclipse.jetty.websocket.api.Session,​java.util.Map<java.lang.String,​java.lang.Object>> props
        The websockets per session.
    • Constructor Detail

      • JettyWebsocketServer

        public JettyWebsocketServer​(IInternalAccess agent)
        Create a new rest websocket.
    • Method Detail

      • onConnect

        @OnWebSocketConnect
        public void onConnect​(org.eclipse.jetty.websocket.api.Session session)
      • onText

        @OnWebSocketMessage
        public void onText​(org.eclipse.jetty.websocket.api.Session session,
                           java.lang.String message)
      • onClose

        @OnWebSocketClose
        public void onClose​(org.eclipse.jetty.websocket.api.Session session,
                            int status,
                            java.lang.String reason)
      • onError

        @OnWebSocketError
        public void onError​(java.lang.Throwable error)
      • getUserProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getUserProperties​(org.eclipse.jetty.websocket.api.Session session)