Class WebSocketSender


  • public class WebSocketSender
    extends java.lang.Object
    This class implements a connection to a Web-Browser using the Remote Debug Protocol over Web-Sockets.

    Browser Remote Debug Protocol Connection Class


    Java is capable of communicating with either a Headless instance of Google Chrome - or any browser that implements the Remote Debuggin Protocol. It is not mandatory to run the browser in headless mode, but it is more common.


    • Method Summary

       
      Close the Browser WebSocket Connection
      Modifier and Type Method
      void disconnect()
      • Methods inherited from class java.lang.Object

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

      • WebSocketSender

        🡅  🡇     🗕  🗗  🗖
        public WebSocketSender​(java.lang.String url,
                               ConnRecord connRec)
                        throws java.io.IOException,
                               WebSocketException
        Opens a Connection to a Web Browser using a Web-Socket. This class will now be ready to accept send(Script, Promise) messages to the browser.
        Parameters:
        url - This is a URL that is generated by the browser, and has a base URL that is just 127.0.0.1, followed by a port number. There will also be an identifier-code.
        Throws:
        java.io.IOException - Throws if there are problems connecting the socket.
        WebSocketException - Throws if the NeoVisionaries Package encounters a problem building the socket connection.