Skip to content

Commit a7a6494

Browse files
committed
Fix: suggested changes
1 parent 03e55fd commit a7a6494

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

api/src/main/java/io/grpc/ChannelConfigurator.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
* @since 1.83.0
5050
*/
5151
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/12574")
52+
@FunctionalInterface
5253
public interface ChannelConfigurator {
5354

5455
/**
@@ -57,6 +58,13 @@ public interface ChannelConfigurator {
5758
* <p>This method is invoked synchronously during the creation of the child channel,
5859
* before {@link ManagedChannelBuilder#build()} is called.
5960
*
61+
* <p><strong>Note:</strong> Implementations must only apply configurations to the
62+
* provided builder and must NOT call {@code builder.build()} themselves.
63+
*
64+
* <p><strong>Note:</strong> The provided {@code builder} is generic ({@code ?}). Implementations
65+
* should use universal configuration methods (like {@code intercept()}, {@code userAgent()}) on the builder
66+
* rather than casting it to specific implementation types.
67+
*
6068
* @param builder the mutable channel builder for the new child channel
6169
*/
6270
void configureChannelBuilder(ManagedChannelBuilder<?> builder);

0 commit comments

Comments
 (0)