@@ -238,8 +238,9 @@ public final void onAddresses(
238238 * Handles updates on resolved addresses and attributes. If
239239 * {@link ResolutionResult#getAddressesOrError()} is empty, {@link #onError(Status)} will be
240240 * called.
241- * New implementations should prefer overriding onResult2. This method exists to facilitate
242- * older implementations using {@link Listener} to migrate to {@link Listener2}.
241+ *
242+ * <p>Newer NameResolver implementations should prefer calling onResult2. This method exists to
243+ * facilitate older {@link Listener} implementations to migrate to {@link Listener2}.
243244 *
244245 * @param resolutionResult the resolved server addresses, attributes, and Service Config.
245246 * @since 1.21.0
@@ -249,9 +250,10 @@ public final void onAddresses(
249250 /**
250251 * Handles a name resolving error from the resolver. The listener is responsible for eventually
251252 * invoking {@link NameResolver#refresh()} to re-attempt resolution.
252- * New implementations should prefer overriding onResult2 which will have the address
253- * resolution error in {@link ResolutionResult}'s addressesOrError. This method exists to
254- * facilitate older implementations using {@link Listener} to migrate to {@link Listener2}.
253+ *
254+ * <p>New NameResolver implementations should prefer calling onResult2 which will have the
255+ * address resolution error in {@link ResolutionResult}'s addressesOrError. This method exists
256+ * to facilitate older implementations using {@link Listener} to migrate to {@link Listener2}.
255257 *
256258 * @param error a non-OK status
257259 * @since 1.21.0
@@ -260,8 +262,9 @@ public final void onAddresses(
260262 public abstract void onError (Status error );
261263
262264 /**
263- * Handles updates on resolved addresses and attributes. Must be called from
264- * {@link SynchronizationContext}.
265+ * Handles updates on resolved addresses and attributes. Must be called from the same
266+ * {@link SynchronizationContext} available in {@link NameResolver.Args} that is passed
267+ * from the channel.
265268 *
266269 * @param resolutionResult the resolved server addresses or error in address resolution,
267270 * attributes, and Service Config or error
0 commit comments