Class MessageEndpointListener

java.lang.Object
com.couchbase.lite.MessageEndpointListener
All Implemented Interfaces:
com.couchbase.lite.internal.Listenable<MessageEndpointListenerChange,MessageEndpointListenerChangeListener>

public class MessageEndpointListener extends Object implements com.couchbase.lite.internal.Listenable<MessageEndpointListenerChange,MessageEndpointListenerChangeListener>
ENTERPRISE EDITION API

MessageEndpointListener to serve incoming message endpoint connection.

  • Constructor Details

  • Method Details

    • accept

      public void accept(@NonNull MessageEndpointConnection connection)
      Accept a new connection.
      Parameters:
      connection - new incoming connection
    • close

      public void close(@NonNull MessageEndpointConnection connection)
      Close the given connection.
      Parameters:
      connection - the connection to be closed
    • closeAll

      public void closeAll()
      Close all connections active at the time of the call.
    • addChangeListener

      @NonNull public ListenerToken addChangeListener(@NonNull MessageEndpointListenerChangeListener listener)
      Add a change listener.
      Specified by:
      addChangeListener in interface com.couchbase.lite.internal.Listenable<MessageEndpointListenerChange,MessageEndpointListenerChangeListener>
      Parameters:
      listener - the listener
      Returns:
      listener identifier
    • addChangeListener

      @NonNull public ListenerToken addChangeListener(@Nullable Executor queue, @NonNull MessageEndpointListenerChangeListener listener)
      Add a change listener with the given dispatch queue.
      Specified by:
      addChangeListener in interface com.couchbase.lite.internal.Listenable<MessageEndpointListenerChange,MessageEndpointListenerChangeListener>
      Parameters:
      queue - the executor on which the listener will run
      listener - the listener
      Returns:
      listener identifier
    • removeChangeListener

      @Deprecated public void removeChangeListener(@NonNull ListenerToken token)
      Deprecated.
      use ListenerToken.remove
      Remove a change listener.
      Parameters:
      token - identifier for the listener to be removed
    • dispatchStatusChanged

      public void dispatchStatusChanged(@Nullable com.couchbase.lite.internal.core.C4Replicator repl, @Nullable com.couchbase.lite.internal.core.C4ReplicatorStatus status)