Interface ExecListener


public interface ExecListener
  • Method Summary

    Modifier and Type Method Description
    void onClose​(int code, String reason)
    Called when the server sends a close message.
    void onFailure​(Throwable t, okhttp3.Response response)
    Called when the transport or protocol layer of this web socket errors during communication.
    void onOpen​(okhttp3.Response response)
    Called when the request has successfully been upgraded to a web socket.
  • Method Details

    • onOpen

      void onOpen​(okhttp3.Response response)
      Called when the request has successfully been upgraded to a web socket.
      Parameters:
      response - OkHttp response object
    • onFailure

      void onFailure​(Throwable t, okhttp3.Response response)
      Called when the transport or protocol layer of this web socket errors during communication.
      Parameters:
      t - Throwable
      response - Present when the failure is a direct result of the response (e.g., failed upgrade, non-101 response code, etc.). null otherwise.
    • onClose

      void onClose​(int code, String reason)
      Called when the server sends a close message. This may have been initiated from a call to close() or as an unprompted message from the server.
      Parameters:
      code - The RFC-compliant status code.
      reason - Reason for close or an empty string.