Package com.couchbase.lite
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(MessageEndpointConnection connection) Accept a new connection.Add a change listener.addChangeListener
(Executor queue, MessageEndpointListenerChangeListener listener) Add a change listener with the given dispatch queue.void
close
(MessageEndpointConnection connection) Close the given connection.void
closeAll()
Close all connections active at the time of the call.void
dispatchStatusChanged
(com.couchbase.lite.internal.core.C4Replicator repl, com.couchbase.lite.internal.core.C4ReplicatorStatus status) void
Deprecated.use ListenerToken.remove
-
Constructor Details
-
MessageEndpointListener
-
-
Method Details
-
accept
Accept a new connection.- Parameters:
connection
- new incoming connection
-
close
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 interfacecom.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 interfacecom.couchbase.lite.internal.Listenable<MessageEndpointListenerChange,
MessageEndpointListenerChangeListener> - Parameters:
queue
- the executor on which the listener will runlistener
- the listener- Returns:
- listener identifier
-
removeChangeListener
Deprecated.use ListenerToken.removeRemove 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)
-