Interface Connection


public interface Connection
Connection API

Use this API to check if the connection is established and to be notified when the connection is established.

Since:
1.7.5
  • Method Details

    • isConnected

      boolean isConnected()
      Checks if the connection is established.
      Returns:
      true if the connection is established, false otherwise
    • subscribe

      Subscribes the specified listener to be notified when the connection state is changed. If the connection is already established, the listener will be notified immediately.
      Parameters:
      listener - connection listener
      Returns:
      a completion stage that will complete when the listener is subscribed.