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 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 connection
        completion - the completion callback
      • close

        void close​(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 message
        completion - the completion callback