Package io.objectbox.sync
Class SyncBuilder
java.lang.Object
io.objectbox.sync.SyncBuilder
A builder to create a
SyncClient; the builder itself should be created via
Sync.client(BoxStore, String, SyncCredentials).-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final BoxStore(package private) SyncChangeListener(package private) SyncCompletedListener(package private) SyncConnectionListener(package private) final List<SyncCredentials> (package private) SyncListener(package private) SyncLoginListener(package private) final Platform(package private) SyncBuilder.RequestUpdatesMode(package private) SyncTimeListener(package private) String[](package private) boolean(package private) String -
Constructor Summary
ConstructorsConstructorDescriptionSyncBuilder(BoxStore boxStore, SyncCredentials credentials) SyncBuilder(BoxStore boxStore, SyncCredentials[] multipleCredentials) SyncBuilder(BoxStore boxStore, String url, SyncCredentials credentials) SyncBuilder(BoxStore boxStore, String url, SyncCredentials[] multipleCredentials) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns a Sync client ready toSyncClient.start().Builds,startsand returns a Sync client.changeListener(SyncChangeListener changeListener) Sets a listener to observe fine granular changes happening during sync.private voidcheckNotNull(Object object, String message) private static voidcompletedListener(SyncCompletedListener completedListener) Sets a listener to only observe Sync completed events.connectionListener(SyncConnectionListener connectionListener) Sets a listener to only observe Sync connection events.listener(SyncListener listener) Sets a listener to observe all Sync events like login or sync completion.loginListener(SyncLoginListener loginListener) Sets a listener to only observe Sync login events.requestUpdatesMode(SyncBuilder.RequestUpdatesMode requestUpdatesMode) Configure automatic sync updates from the server.(package private) SyncBuilderAllows internal code to set the Sync server URL after creating this builder.timeListener(SyncTimeListener timeListener) Sets a listener to only observe Sync time events.trustedCertificates(String[] paths) Configures a custom set of directory or file paths to search for trusted certificates in.Turns on sending of uncommitted acks.
-
Field Details
-
platform
-
boxStore
-
url
String url -
credentials
-
loginListener
-
completedListener
-
changeListener
-
connectionListener
-
timeListener
-
listener
-
trustedCertPaths
-
uncommittedAcks
boolean uncommittedAcks -
requestUpdatesMode
SyncBuilder.RequestUpdatesMode requestUpdatesMode
-
-
Constructor Details
-
SyncBuilder
-
SyncBuilder
-
SyncBuilder
-
SyncBuilder
-
-
Method Details
-
checkSyncFeatureAvailable
private static void checkSyncFeatureAvailable() -
serverUrl
Allows internal code to set the Sync server URL after creating this builder. -
trustedCertificates
Configures a custom set of directory or file paths to search for trusted certificates in. The first path that exists will be used.Using this option is not recommended in most cases, as by default the sync client uses the certificate authorities trusted by the host platform.
-
requestUpdatesMode
Configure automatic sync updates from the server. If automatic sync updates are turned off, they will need to be requested using the sync client.- See Also:
-
uncommittedAcks
Turns on sending of uncommitted acks. -
loginListener
Sets a listener to only observe Sync login events.This listener can also be
set or removedon the Sync client directly. -
completedListener
Sets a listener to only observe Sync completed events.This listener can also be
set or removedon the Sync client directly. -
changeListener
Sets a listener to observe fine granular changes happening during sync.This listener can also be
set or removedon the Sync client directly. -
timeListener
Sets a listener to only observe Sync time events.This listener can also be
set or removedon the Sync client directly. -
connectionListener
Sets a listener to only observe Sync connection events.This listener can also be
set or removedon the Sync client directly. -
listener
Sets a listener to observe all Sync events like login or sync completion.Note: this will replace any login, completed or connection listener.
This listener can also be
set or removedon the Sync client directly. -
build
Builds and returns a Sync client ready toSyncClient.start(). -
buildAndStart
Builds,startsand returns a Sync client. -
checkNotNull
-