Package com.couchbase.lite
Interface MessageEndpointConnection
public interface MessageEndpointConnection
ENTERPRISE EDITION API
The interface implemented by the application using a custom transportation method to exchange replication data between peers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(Exception error, MessagingCloseCompletion completion) Called to close the remote connection with the other peer when the replicator stops or when the MessageEndpointListener closes the connection.void
open
(ReplicatorConnection connection, MessagingCompletion completion) Called to open a remote connection to the other peer when the replicator starts or when the MessageEndpointListener accepts the connection.void
send
(Message message, MessagingCompletion completion) Called to send the replication data to the other peer.
-
Method Details
-
open
Called to open a remote connection to the other peer when the replicator starts or when the MessageEndpointListener accepts the connection. When the remote connection is established, call the completion block to acknowledge the completion.- Parameters:
connection
- the replicator connectioncompletion
- the completion callback
-
send
Called to send the replication data to the other peer. When the replication data is sent, call the completion block to acknowledge the completion.- Parameters:
message
- the messagecompletion
- the completion callback
-
close
Called to close the remote connection with the other peer when the replicator stops or when the MessageEndpointListener closes the connection. When the remote connection is closed, call the completion block to acknowledge the completion.- Parameters:
error
- null on success or an exception describing the failurecompletion
- the completion callback
-