Interface GrpcChannelBuilderCustomizer<T extends io.grpc.ManagedChannelBuilder<T>>
- Type Parameters:
T- type of builder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface GrpcChannelBuilderCustomizer<T extends io.grpc.ManagedChannelBuilder<T>>
Callback interface that can be used to customize a
ManagedChannelBuilder for a
specific target.- Author:
- Dave Syer, Chris Bono
-
Method Summary
Modifier and TypeMethodDescriptionvoidCallback to customize achannel builderinstance for a specific target string.static <T extends io.grpc.ManagedChannelBuilder<T>>
GrpcChannelBuilderCustomizer<T> defaults()Used to indicate no customizations should be made to the builder.static <T extends io.grpc.ManagedChannelBuilder<T>>
GrpcChannelBuilderCustomizer<T> default GrpcChannelBuilderCustomizer<T> then(GrpcChannelBuilderCustomizer<T> other)
-
Method Details
-
customize
Callback to customize achannel builderinstance for a specific target string. The target can be either a valid nameresolver-compliant URI or an authority string as described inGrpc.newChannelBuilder(String, ChannelCredentials), or the name of a user-configured channel (e.g. 'my-channel').- Parameters:
target- the target stringbuilder- the builder to customize
-
then
-
defaults
Used to indicate no customizations should be made to the builder.- Type Parameters:
T- type of channel builder- Returns:
- the default customizer
-
matching
static <T extends io.grpc.ManagedChannelBuilder<T>> GrpcChannelBuilderCustomizer<T> matching(String pattern, Consumer<io.grpc.ManagedChannelBuilder<T>> consumer)
-