Module org.htmlunit

Interface WebSocketAdapter

All Known Implementing Classes:
JettyWebSocketAdapter

public interface WebSocketAdapter
Helper to have no direct dependency to the WebSockt client implementation used by HtmlUnit.
Author:
Ronald Brill
  • Method Details

    • start

      void start() throws Exception
      Starts the client.
      Throws:
      Exception - in case of error
    • connect

      void connect(URI url) throws Exception
      Connects to the given URI.
      Parameters:
      url - the target url
      Throws:
      Exception - in case of error
    • send

      void send(Object content) throws IOException
      Sends the provided content.
      Parameters:
      content - the content to be sent
      Throws:
      IOException - in case of error
    • closeIncomingSession

      void closeIncomingSession() throws Exception
      Close the incoming session.
      Throws:
      Exception - in case of error
    • closeOutgoingSession

      void closeOutgoingSession() throws Exception
      Close the outgoing session.
      Throws:
      Exception - in case of error
    • closeClient

      void closeClient() throws Exception
      Close the client.
      Throws:
      Exception - in case of error