23
23
24
24
/**
25
25
* <a href="https://objectbox.io/sync/">ObjectBox Sync</a> makes data available on other devices.
26
- * Start building a sync client using Sync.{@link #client(BoxStore, String, SyncCredentials)}
27
- * or an embedded server using Sync.{@link #server(BoxStore, String, SyncCredentials)} .
26
+ * <p>
27
+ * Use the static methods to build a Sync client or embedded server .
28
28
*/
29
29
@ SuppressWarnings ({"unused" , "WeakerAccess" })
30
30
public final class Sync {
@@ -51,8 +51,13 @@ public static boolean isHybridAvailable() {
51
51
}
52
52
53
53
/**
54
- * Start building a sync client. Requires the BoxStore that should be synced with the server,
55
- * the URL and port of the server to connect to and credentials to authenticate against the server.
54
+ * Starts building a {@link SyncClient}. Once done, complete with {@link SyncBuilder#build() build()}.
55
+ *
56
+ * @param boxStore The {@link BoxStore} the client should use.
57
+ * @param url The URL of the Sync server on which the Sync protocol is exposed. This is typically a WebSockets URL
58
+ * starting with {@code ws://} or {@code wss://} (for encrypted connections), for example
59
+ * {@code ws://127.0.0.1:9999}.
60
+ * @param credentials {@link SyncCredentials} to authenticate with the server.
56
61
*/
57
62
public static SyncBuilder client (BoxStore boxStore , String url , SyncCredentials credentials ) {
58
63
return new SyncBuilder (boxStore , url , credentials );
@@ -67,8 +72,8 @@ public static SyncBuilder client(BoxStore boxStore, String url, SyncCredentials
67
72
* @param url The URL of the Sync server on which the Sync protocol is exposed. This is typically a WebSockets URL
68
73
* starting with {@code ws://} or {@code wss://} (for encrypted connections), for example
69
74
* {@code ws://0.0.0.0:9999}.
70
- * @param authenticatorCredentials A list of enabled authentication methods available to Sync clients. Additional
71
- * authenticator credentials can be supplied using the builder. For the embedded server, currently only
75
+ * @param authenticatorCredentials An authentication method available to Sync clients and peers . Additional
76
+ * authenticator credentials can be supplied using the returned builder. For the embedded server, currently only
72
77
* {@link SyncCredentials#sharedSecret} and {@link SyncCredentials#none} are supported.
73
78
*/
74
79
public static SyncServerBuilder server (BoxStore boxStore , String url , SyncCredentials authenticatorCredentials ) {
0 commit comments