Package io.grpc.netty
Class UdsNettyChannelProvider
java.lang.Object
io.grpc.ManagedChannelProvider
io.grpc.netty.UdsNettyChannelProvider
Provider for
NettyChannelBuilder
instances for UDS channels.-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.ManagedChannelProvider
ManagedChannelProvider.NewChannelBuilderResult, ManagedChannelProvider.ProviderNotFoundException
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilderForAddress
(String name, int port) Creates a new builder with the given host and port.builderForTarget
(String target) Creates a new builder with the given target URI.protected Collection
<Class<? extends SocketAddress>> Returns theSocketAddress
types this ManagedChannelProvider supports.boolean
Whether this provider is available for use, taking the current environment into consideration.newChannelBuilder
(String target, ChannelCredentials creds) Creates a new builder with the given target URI and credentials.int
priority()
A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.Methods inherited from class io.grpc.ManagedChannelProvider
provider
-
Constructor Details
-
UdsNettyChannelProvider
public UdsNettyChannelProvider()
-
-
Method Details
-
isAvailable
public boolean isAvailable()Description copied from class:ManagedChannelProvider
Whether this provider is available for use, taking the current environment into consideration. Iffalse
, no other methods are safe to be called.- Specified by:
isAvailable
in classManagedChannelProvider
-
priority
public int priority()Description copied from class:ManagedChannelProvider
A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration. 5 should be considered the default, and then tweaked based on environment detection. A priority of 0 does not imply that the provider wouldn't work; just that it should be last in line.- Specified by:
priority
in classManagedChannelProvider
-
builderForAddress
Description copied from class:ManagedChannelProvider
Creates a new builder with the given host and port.- Specified by:
builderForAddress
in classManagedChannelProvider
-
builderForTarget
Description copied from class:ManagedChannelProvider
Creates a new builder with the given target URI.- Specified by:
builderForTarget
in classManagedChannelProvider
-
newChannelBuilder
public ManagedChannelProvider.NewChannelBuilderResult newChannelBuilder(String target, ChannelCredentials creds) Description copied from class:ManagedChannelProvider
Creates a new builder with the given target URI and credentials. Returns an error-string result if unable to understand the credentials.- Overrides:
newChannelBuilder
in classManagedChannelProvider
-
getSupportedSocketAddressTypes
Description copied from class:ManagedChannelProvider
Returns theSocketAddress
types this ManagedChannelProvider supports.- Specified by:
getSupportedSocketAddressTypes
in classManagedChannelProvider
-