SyncClientJava

This is a central entity used to work with Sync.

After creating a SyncClientJava you can open, create and modify SyncDocumentJavas, SyncListJavas, SyncMapJavas and SyncStreamJavas.

Example:

SyncClientFactory.create(context, tokenProvider, new SuccessListener<SyncClientJava>() {

@Override
public void onSuccess(@NonNull SyncClientJava result) {
future.set(result);
}

@Override
public void onFailure(@NonNull ErrorInfo errorInfo) {
fail("Cannot create SyncClient: " + errorInfo);
}
});

Types

Link copied to clipboard
object Companion
Link copied to clipboard
interface Listener

This interface defines SyncClient callback methods.

Properties

Link copied to clipboard
abstract val connectionState: <Error class: unknown class>

Current transport state.

Link copied to clipboard
abstract val documents: DocumentsJava

Provides methods to work with sync documents.

Link copied to clipboard
abstract val lists: ListsJava

Provides methods to work with sync lists.

Link copied to clipboard
abstract val maps: MapsJava

Provides methods to work with sync maps.

Link copied to clipboard
abstract val streams: StreamsJava

Provides methods to work with sync streams.

Functions

Link copied to clipboard
abstract override fun addListener(listener: SyncClientJava.Listener)

Method to add listener for this SyncClientJava.

Link copied to clipboard
abstract override fun removeAllListeners()

Method to remove all listeners from this SyncClientJava.

Link copied to clipboard
abstract override fun removeListener(listener: SyncClientJava.Listener)

Method to Method to remove listener from this SyncClientJava.

Link copied to clipboard
abstract fun shutdown()

Cleanly shuts down the SyncClient when you are done with it. After calling this method client could not be reused.