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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close(java.lang.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 Detail
-
open
void open(@NonNull ReplicatorConnection connection, @NonNull MessagingCompletion completion)
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
-
close
void close(java.lang.Exception error, @NonNull MessagingCloseCompletion completion)
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:
completion
- the completion callback
-
send
void send(@NonNull Message message, @NonNull MessagingCompletion completion)
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
-
-