@Experimental
public class SyncServerBuilder
extends java.lang.Object
SyncServer and allows to set additional configuration.| Constructor and Description |
|---|
SyncServerBuilder(BoxStore boxStore,
java.lang.String url,
SyncCredentials authenticatorCredentials) |
| Modifier and Type | Method and Description |
|---|---|
SyncServerBuilder |
authenticatorCredentials(SyncCredentials authenticatorCredentials)
Adds additional authenticator credentials to authenticate clients with.
|
SyncServer |
build()
Builds and returns a Sync server ready to
SyncServer.start(). |
SyncServer |
buildAndStart()
Builds,
starts and returns a Sync server. |
SyncServerBuilder |
certificatePath(java.lang.String certificatePath) |
SyncServerBuilder |
changeListener(SyncChangeListener changeListener)
Sets a listener to observe fine granular changes happening during sync.
|
SyncServerBuilder |
peer(java.lang.String url)
Adds a server peer, to which this server should connect to as a client using
SyncCredentials.none(). |
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.
|
public SyncServerBuilder(BoxStore boxStore, java.lang.String url, SyncCredentials authenticatorCredentials)
public SyncServerBuilder certificatePath(java.lang.String certificatePath)
public SyncServerBuilder authenticatorCredentials(SyncCredentials authenticatorCredentials)
public SyncServerBuilder changeListener(SyncChangeListener changeListener)
This listener can also be set or removed
on the Sync server directly.
public SyncServerBuilder peer(java.lang.String url)
SyncCredentials.none().public SyncServerBuilder peer(java.lang.String url, SyncCredentials credentials)
public SyncServer build()
SyncServer.start().
Note: this clears all previously set authenticator credentials.public SyncServer buildAndStart()
starts and returns a Sync server.