Class WebSocketConnection

  • All Implemented Interfaces:
    org.eclipse.jetty.websocket.api.WebSocketConnectionListener, org.eclipse.jetty.websocket.api.WebSocketListener

    public class WebSocketConnection
    extends java.lang.Object
    implements org.eclipse.jetty.websocket.api.WebSocketListener
    • Constructor Summary

      Constructors 
      Constructor Description
      WebSocketConnection​(JavaScript javaScript, jdk.nashorn.api.scripting.ScriptObjectMirror thiz, java.lang.Object connector, java.lang.String url, java.lang.String protocol)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(int code, java.lang.String reason)  
      void onWebSocketBinary​(byte[] payload, int offset, int len)  
      void onWebSocketClose​(int closeCode, java.lang.String reason)  
      void onWebSocketConnect​(org.eclipse.jetty.websocket.api.Session session)  
      void onWebSocketError​(java.lang.Throwable x)  
      void onWebSocketText​(java.lang.String data)  
      void send​(java.lang.String data)  
      • Methods inherited from class java.lang.Object

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

      • WebSocketConnection

        public WebSocketConnection​(JavaScript javaScript,
                                   jdk.nashorn.api.scripting.ScriptObjectMirror thiz,
                                   java.lang.Object connector,
                                   java.lang.String url,
                                   java.lang.String protocol)
    • Method Detail

      • send

        public void send​(java.lang.String data)
                  throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close​(int code,
                          java.lang.String reason)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • onWebSocketConnect

        public void onWebSocketConnect​(org.eclipse.jetty.websocket.api.Session session)
        Specified by:
        onWebSocketConnect in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
      • onWebSocketBinary

        public void onWebSocketBinary​(byte[] payload,
                                      int offset,
                                      int len)
        Specified by:
        onWebSocketBinary in interface org.eclipse.jetty.websocket.api.WebSocketListener
      • onWebSocketText

        public void onWebSocketText​(java.lang.String data)
        Specified by:
        onWebSocketText in interface org.eclipse.jetty.websocket.api.WebSocketListener
      • onWebSocketClose

        public void onWebSocketClose​(int closeCode,
                                     java.lang.String reason)
        Specified by:
        onWebSocketClose in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
      • onWebSocketError

        public void onWebSocketError​(java.lang.Throwable x)
        Specified by:
        onWebSocketError in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener