@Internal @ThreadSafe public final class ManagedChannelRegistry extends Object
ManagedChannelProviders. The default instance
loads providers at runtime through the Java service provider mechanism.| Modifier and Type | Class and Description |
|---|---|
static class |
ManagedChannelRegistry.ProviderNotFoundException
Thrown when no suitable
ManagedChannelProvider objects can be found. |
| Constructor and Description |
|---|
ManagedChannelRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
deregister(ManagedChannelProvider provider)
Deregisters a provider.
|
static ManagedChannelRegistry |
getDefaultRegistry()
Returns the default registry that loads providers via the Java service loader mechanism.
|
void |
register(ManagedChannelProvider provider)
Register a provider.
|
public void register(ManagedChannelProvider provider)
If the provider's isAvailable() returns
false, this method will throw IllegalArgumentException.
Providers will be used in priority order. In case of ties, providers are used in registration order.
public void deregister(ManagedChannelProvider provider)
provider - the provider that was added to the register via register(io.grpc.ManagedChannelProvider).public static ManagedChannelRegistry getDefaultRegistry()