ManagedChannelProviders. The default instance
loads providers at runtime through the Java service provider mechanism.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static class | ManagedChannelRegistry.ProviderNotFoundException
Thrown when no suitable |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedHashSet | |
| private List | effectiveProviders
Immutable, sorted version of |
| private static ManagedChannelRegistry | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private synchronized void | |
| public synchronized void | deregister(ManagedChannelProvider
the provider that was added to the register via provider)register.Deregisters a provider. |
| public static synchronized ManagedChannelRegistry | getDefaultRegistry()
Returns the default registry that loads providers via the Java service loader mechanism. |
| pack-priv static List | |
| pack-priv ManagedChannelBuilder | |
| pack-priv ManagedChannelBuilder | newChannelBuilder(NameResolverRegistry nameResolverRegistry, String target, ChannelCredentials creds)
|
| pack-priv ManagedChannelProvider | |
| pack-priv synchronized List | |
| private synchronized void | |
| public synchronized void |
| allProviders | back to summary |
|---|---|
private final LinkedHashSet<ManagedChannelProvider> allProviders
| |
| effectiveProviders | back to summary |
|---|---|
| private List<ManagedChannelProvider> effectiveProviders Immutable, sorted version of
| |
| instance | back to summary |
|---|---|
| private static ManagedChannelRegistry instance | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| ManagedChannelRegistry | back to summary |
|---|---|
| public ManagedChannelRegistry() | |
| addProvider | back to summary |
|---|---|
| private synchronized void addProvider(ManagedChannelProvider provider) | |
| deregister | back to summary |
|---|---|
| public synchronized void deregister(ManagedChannelProvider provider) Deregisters a provider. No-op if the provider is not in the registry.
| |
| getDefaultRegistry | back to summary |
|---|---|
| public static synchronized ManagedChannelRegistry getDefaultRegistry() Returns the default registry that loads providers via the Java service loader mechanism. | |
| getHardCodedClasses | back to summary |
|---|---|
pack-priv static List
| |
| newChannelBuilder | back to summary |
|---|---|
| pack-priv ManagedChannelBuilder | |
| newChannelBuilder | back to summary |
|---|---|
pack-priv ManagedChannelBuilder
| |
| provider | back to summary |
|---|---|
| pack-priv ManagedChannelProvider provider() | |
| providers | back to summary |
|---|---|
| pack-priv synchronized List Returns effective providers, in priority order.
| |
| refreshProviders | back to summary |
|---|---|
| private synchronized void refreshProviders() | |
| register | back to summary |
|---|---|
| public synchronized void register(ManagedChannelProvider provider) Register a provider. If the provider's Providers will be used in priority order. In case of ties, providers are used in registration order. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | getPriority(ManagedChannelProvider provider)
Implements io. |
| public boolean | isAvailable(ManagedChannelProvider provider)
Implements io. |
| ManagedChannelPriorityAccessor | back to summary |
|---|---|
| private ManagedChannelPriorityAccessor() | |
| getPriority | back to summary |
|---|---|
| public int getPriority(ManagedChannelProvider provider) Implements io. Doc from io. 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.
| |
| isAvailable | back to summary |
|---|---|
| public boolean isAvailable(ManagedChannelProvider provider) Implements io. Doc from io. Checks this provider is available for use, taking the current environment into consideration.
If
| |
ManagedChannelProvider objects can be found.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| ProviderNotFoundException | back to summary |
|---|---|
| public ProviderNotFoundException(String msg) | |