Interface GrpcChannelFactory
- All Known Implementing Classes:
CompositeGrpcChannelFactory, DefaultGrpcChannelFactory, InProcessGrpcChannelFactory, NettyGrpcChannelFactory, ShadedNettyGrpcChannelFactory
ManagedChannel instances.- Author:
- Dave Syer, Chris Bono
-
Method Summary
Modifier and TypeMethodDescriptiondefault io.grpc.ManagedChannelcreateChannel(String target) Creates aManagedChannelfor the given target string.io.grpc.ManagedChannelcreateChannel(String target, ChannelBuilderOptions options) Creates aManagedChannelfor the given target string.default booleansupports(io.grpc.ClientInterceptor interceptor) Whether this factory supports the given globalClientInterceptor.booleanWhether this factory supports the given target string.
-
Method Details
-
supports
Whether this factory supports the given target string.The target can be either a valid nameresolver-compliant URI or an authority string as described in
Grpc.newChannelBuilder(String, ChannelCredentials), or the name of a user-configured channel (e.g. 'my-channel').- Parameters:
target- the target string- Returns:
- whether this factory supports the given target string
-
supports
default boolean supports(io.grpc.ClientInterceptor interceptor) Whether this factory supports the given globalClientInterceptor.- Parameters:
interceptor- the client interceptor to check support for- Returns:
- whether this factory supports the given interceptor
-
createChannel
Creates aManagedChannelfor the given target string.The target can be either a valid nameresolver-compliant URI or an authority string as described in
Grpc.newChannelBuilder(String, ChannelCredentials), or the name of a user-configured channel (e.g. 'my-channel').The returned channel is configured to use all globally registered
interceptors.- Parameters:
target- the target string- Returns:
- a channel for the given target
-
createChannel
Creates aManagedChannelfor the given target string. The target can beThe target can be either a valid nameresolver-compliant URI or an authority string as described in
Grpc.newChannelBuilder(String, ChannelCredentials), or the name of a user-configured channel (e.g. 'my-channel').The returned channel is configured to use all globally registered
interceptorsand any user-provided interceptor if specified in theoptions.- Parameters:
target- the target string as described in method javadocsoptions- the options for building the created channel, orChannelBuilderOptions.defaults()to use default options- Returns:
- a channel for the given target
-