Package io.objectbox.sync.server
Class SyncServerBuilder
- java.lang.Object
-
- io.objectbox.sync.server.SyncServerBuilder
-
@Experimental public class SyncServerBuilder extends java.lang.ObjectCreates aSyncServerand allows to set additional configuration.
-
-
Constructor Summary
Constructors Constructor Description SyncServerBuilder(BoxStore boxStore, java.lang.String url, SyncCredentials authenticatorCredentials)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SyncServerBuilderauthenticatorCredentials(SyncCredentials authenticatorCredentials)Adds additional authenticator credentials to authenticate clients with.SyncServerbuild()Builds and returns a Sync server ready toSyncServer.start().SyncServerbuildAndStart()Builds,startsand returns a Sync server.SyncServerBuildercertificatePath(java.lang.String certificatePath)SyncServerBuilderchangeListener(SyncChangeListener changeListener)Sets a listener to observe fine granular changes happening during sync.SyncServerBuilderpeer(java.lang.String url)Adds a server peer, to which this server should connect to as a client usingSyncCredentials.none().SyncServerBuilderpeer(java.lang.String url, SyncCredentials credentials)Adds a server peer, to which this server should connect to as a client using the given credentials.
-
-
-
Constructor Detail
-
SyncServerBuilder
public SyncServerBuilder(BoxStore boxStore, java.lang.String url, SyncCredentials authenticatorCredentials)
-
-
Method Detail
-
certificatePath
public SyncServerBuilder certificatePath(java.lang.String certificatePath)
-
authenticatorCredentials
public SyncServerBuilder authenticatorCredentials(SyncCredentials authenticatorCredentials)
Adds additional authenticator credentials to authenticate clients with.
-
changeListener
public SyncServerBuilder changeListener(SyncChangeListener changeListener)
Sets a listener to observe fine granular changes happening during sync.This listener can also be
set or removedon the Sync server directly.
-
peer
public SyncServerBuilder peer(java.lang.String url)
Adds a server peer, to which this server should connect to as a client usingSyncCredentials.none().
-
peer
public SyncServerBuilder peer(java.lang.String url, SyncCredentials credentials)
Adds a server peer, to which this server should connect to as a client using the given credentials.
-
build
public SyncServer build()
Builds and returns a Sync server ready toSyncServer.start(). Note: this clears all previously set authenticator credentials.
-
buildAndStart
public SyncServer buildAndStart()
Builds,startsand returns a Sync server.
-
-