Module org.htmlunit

Interface WebSocketListener


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

    • onWebSocketConnecting

      void onWebSocketConnecting()
      Callback to be called when connecting.
    • onWebSocketOpen

      void onWebSocketOpen()
      Callback to be called when opened.
    • onWebSocketClose

      void onWebSocketClose(int statusCode, String reason)
      Callback to be called when closed.
      Parameters:
      statusCode - the status code
      reason - the reason
    • onWebSocketText

      void onWebSocketText(String message)
      Callback to be called when closed.
      Parameters:
      message - the message
    • onWebSocketBinary

      void onWebSocketBinary(ByteBuffer payload)
      Callback to be called when binary data retrieved.
      Parameters:
      payload - a ByteBuffer
    • onWebSocketConnectError

      void onWebSocketConnectError(Throwable cause)
      Callback to be called on connect error.
      Parameters:
      cause - the cause
    • onWebSocketError

      void onWebSocketError(Throwable cause)
      Callback to be called on error.
      Parameters:
      cause - the cause