Skip to content

Commit 1057863

Browse files
authored
Improve real-time reference docs. (#4808)
* Improve real-time reference docs. * Change 'the user' to 'you'. * Separate listening and fetching.
1 parent 71772b3 commit 1057863

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

firebase-config/src/main/java/com/google/firebase/remoteconfig/ConfigUpdate.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818
import com.google.auto.value.AutoValue;
1919
import java.util.Set;
2020

21-
/**
22-
* Information about the updated config passed to the {@code onUpdate} callback of {@link
23-
* ConfigUpdateListener}.
24-
*/
21+
/** Information about the updated config passed to {@link ConfigUpdateListener#onUpdate}. */
2522
@AutoValue
2623
public abstract class ConfigUpdate {
2724
@NonNull

firebase-config/src/main/java/com/google/firebase/remoteconfig/ConfigUpdateListener.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,23 @@
1818
import javax.annotation.Nonnull;
1919

2020
/**
21-
* Event listener interface for real-time RC updates. Implement {@code ConfigUpdateListner} to call
22-
* {@link com.google.firebase.remoteconfig.FirebaseRemoteConfig#addOnConfigUpdateListener}.
21+
* Event listener interface for real-time Remote Config updates. Implement {@link
22+
* ConfigUpdateListener} to call {@link
23+
* com.google.firebase.remoteconfig.FirebaseRemoteConfig#addOnConfigUpdateListener}.
2324
*/
2425
public interface ConfigUpdateListener {
2526
/**
26-
* Callback for when a new config has been automatically fetched from the backend and has changed
27-
* from the activated config.
27+
* Callback for when a new config version has been automatically fetched from the backend and has
28+
* changed from the activated config.
2829
*
29-
* @param configUpdate A {@link ConfigUpdate} with information about the updated config, including
30-
* the set of updated parameters.
30+
* @param configUpdate A {@link ConfigUpdate} with information about the updated config version,
31+
* including the set of updated parameters.
3132
*/
3233
void onUpdate(@NonNull ConfigUpdate configUpdate);
3334

3435
/**
35-
* Callback for when an error occurs while listening or fetching a config update.
36+
* Callback for when an error occurs while listening for updates or fetching the latest version of
37+
* the config.
3638
*
3739
* @param error A {@link FirebaseRemoteConfigException} with information about the error.
3840
*/

firebase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfig.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -549,21 +549,21 @@ public Task<Void> reset() {
549549
}
550550

551551
/**
552-
* Start listening for real-time config updates from the Remote Config backend and automatically
553-
* fetch updates from the RC backend when they are available.
552+
* Starts listening for real-time config updates from the Remote Config backend and automatically
553+
* fetches updates from the RC backend when they are available.
554554
*
555555
* <p>If a connection to the Remote Config backend is not already open, calling this method will
556556
* open it. Multiple listeners can be added by calling this method again, but subsequent calls
557557
* re-use the same connection to the backend.
558558
*
559559
* <p>Note: Real-time Remote Config requires the Firebase Remote Config Realtime API. See the <a
560-
* href="https://firebase.google.com/docs/remote-config/get-started">Remote Config Get Started
561-
* </a> guide to enable the API.
560+
* href="https://firebase.google.com/docs/remote-config/get-started#add-real-time-listener">Remote
561+
* Config Get Started </a> guide to enable the API.
562562
*
563563
* @param configUpdateListener A {@link ConfigUpdateListener} that can be used to respond to
564564
* config updates when they're fetched.
565-
* @return A {@link ConfigUpdateListenerRegistration} that allows the user to remove the added
566-
* {@code configUpdateListener} and close the connection when there are no more listeners.
565+
* @return A {@link ConfigUpdateListenerRegistration} that allows you to remove the added {@code
566+
* configUpdateListener} and close the connection when there are no more listeners.
567567
*/
568568
@NonNull
569569
public ConfigUpdateListenerRegistration addOnConfigUpdateListener(

firebase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigClientException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public FirebaseRemoteConfigClientException(@NonNull String detailMessage, @NonNu
4545

4646
/**
4747
* Creates a Firebase Remote Config client exception with the given message, exception cause, and
48-
* FirebaseRemoteConfigException code.
48+
* {@code FirebaseRemoteConfigException} code.
4949
*/
5050
public FirebaseRemoteConfigClientException(
5151
@NonNull String detailMessage, @Nullable Throwable cause, @NonNull Code code) {

firebase-config/src/main/java/com/google/firebase/remoteconfig/FirebaseRemoteConfigServerException.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public FirebaseRemoteConfigServerException(
4545
}
4646

4747
/**
48-
* Creates a Firebase Remote Config server exception with the given message and
49-
* FirebaseRemoteConfigException code.
48+
* Creates a Firebase Remote Config server exception with the given message and {@code
49+
* FirebaseRemoteConfigException} code.
5050
*/
5151
public FirebaseRemoteConfigServerException(@NonNull String detailMessage, @Nonnull Code code) {
5252
super(detailMessage, code);
@@ -55,7 +55,7 @@ public FirebaseRemoteConfigServerException(@NonNull String detailMessage, @Nonnu
5555

5656
/**
5757
* Creates a Firebase Remote Config server exception with the HTTP status code, given message, and
58-
* FirebaseRemoteConfigException code.
58+
* {@code FirebaseRemoteConfigException} code.
5959
*/
6060
public FirebaseRemoteConfigServerException(
6161
int httpStatusCode, @NonNull String detailMessage, @Nonnull Code code) {
@@ -65,7 +65,7 @@ public FirebaseRemoteConfigServerException(
6565

6666
/**
6767
* Creates a Firebase Remote Config server exception with the given message, exception cause, and
68-
* FirebaseRemoteConfigException code.
68+
* {@code FirebaseRemoteConfigException} code.
6969
*/
7070
public FirebaseRemoteConfigServerException(
7171
@NonNull String detailMessage, @Nullable Throwable cause, @NonNull Code code) {
@@ -75,7 +75,7 @@ public FirebaseRemoteConfigServerException(
7575

7676
/**
7777
* Creates a Firebase Remote Config server exception with the HTTP status code, given message,
78-
* exception cause, and FirebaseRemoteConfigException code.
78+
* exception cause, and {@code FirebaseRemoteConfigException} code.
7979
*/
8080
public FirebaseRemoteConfigServerException(
8181
int httpStatusCode,

0 commit comments

Comments
 (0)