Class URLEndpointListener

java.lang.Object
com.couchbase.lite.URLEndpointListener

public class URLEndpointListener extends Object
ENTERPRISE EDITION API

A listener to which remote replicators can connect.

  • Constructor Details

    • URLEndpointListener

      public URLEndpointListener(@NonNull URLEndpointListenerConfiguration config)
      Create a URLEndpointListener with the passed configuration.
      Parameters:
      config - the listener configuration.
  • Method Details

    • getConfig

      @NonNull public URLEndpointListenerConfiguration getConfig()
      Get the listener's configuration.
      Returns:
      the listener's configuration (read only).
    • getPort

      public int getPort()
      Get the listener's port. This method will return a value of -1 except between the time the listener is started and the time it is stopped.

      When a listener is configured with the port number 0, the return value from this function will give the port at which the listener is actually listening.

      Returns:
      the listener's port, or -1.
    • getUrls

      @NonNull public List<URI> getUrls()
      Get the list of URIs for the listener.
      Returns:
      a list of listener URIs.
    • getStatus

      @Nullable public ConnectionStatus getStatus()
      Get the listener status.
      Returns:
      listener status.
    • getTlsIdentity

      @Nullable public TLSIdentity getTlsIdentity()
      Get the TLS identity used by the listener.
      Returns:
      TLS identity.
    • start

      public void start() throws CouchbaseLiteException
      Start the listener.
      Throws:
      CouchbaseLiteException
    • stop

      public void stop()
      Stop the listener.
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object