NameResolverProviders. The default instance
loads providers at runtime through the Java service provider mechanism.
| Modifier and Type | Class and Description |
|---|---|
| private class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final LinkedHashSet | |
| private String | |
| private ImmutableMap | effectiveProviders
Generated from |
| private final NameResolver. | |
| private static NameResolverRegistry | |
| private static final Logger | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private synchronized void | |
| public NameResolver. | |
| public synchronized void | deregister(NameResolverProvider
the provider that was added to the register via provider)register.Deregisters a provider. |
| public static synchronized NameResolverRegistry | getDefaultRegistry()
Returns the default registry that loads providers via the Java service loader mechanism. |
| public synchronized String | |
| pack-priv static List | |
| public NameResolverProvider | |
| pack-priv synchronized Map | providers()
Returns effective providers map from scheme to the highest priority NameResolverProvider of that scheme. |
| private synchronized void | |
| public synchronized void |
| allProviders | back to summary |
|---|---|
private final LinkedHashSet<NameResolverProvider> allProviders
| |
| defaultScheme | back to summary |
|---|---|
private String defaultScheme
| |
| effectiveProviders | back to summary |
|---|---|
| private ImmutableMap<String, NameResolverProvider> effectiveProviders Generated from
| |
| factory | back to summary |
|---|---|
| private final NameResolver. | |
| instance | back to summary |
|---|---|
| private static NameResolverRegistry instance | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| UNKNOWN_SCHEME | back to summary |
|---|---|
| private static final String UNKNOWN_SCHEME | |
| NameResolverRegistry | back to summary |
|---|---|
| public NameResolverRegistry() | |
| addProvider | back to summary |
|---|---|
| private synchronized void addProvider(NameResolverProvider provider) | |
| asFactory | back to summary |
|---|---|
| public NameResolver. | |
| deregister | back to summary |
|---|---|
| public synchronized void deregister(NameResolverProvider provider) Deregisters a provider. No-op if the provider is not in the registry.
| |
| getDefaultRegistry | back to summary |
|---|---|
| public static synchronized NameResolverRegistry getDefaultRegistry() Returns the default registry that loads providers via the Java service loader mechanism. | |
| getDefaultScheme | back to summary |
|---|---|
| public synchronized String getDefaultScheme() | |
| getHardCodedClasses | back to summary |
|---|---|
pack-priv static List
| |
| getProviderForScheme | back to summary |
|---|---|
| public NameResolverProvider getProviderForScheme(String scheme) | |
| providers | back to summary |
|---|---|
| pack-priv synchronized Map Returns effective providers map from scheme to the highest priority NameResolverProvider of that scheme.
| |
| refreshProviders | back to summary |
|---|---|
| private synchronized void refreshProviders() | |
| register | back to summary |
|---|---|
| public synchronized void register(NameResolverProvider 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 String | getDefaultScheme()
Implements abstract io. ManagedChannelBuilder#forTarget(String) is given an authority string instead of a compliant
URI.
|
| public NameResolver | newNameResolver(URI
the target URI to be resolved, whose scheme must not be targetUri, NameResolver.nullother information that may be useful argsImplements abstract io. NameResolver for the given target URI, or null if the given URI
cannot be resolved by this factory.
|
| NameResolverFactory | back to summary |
|---|---|
| private NameResolverFactory() | |
| getDefaultScheme | back to summary |
|---|---|
| public String getDefaultScheme() Implements abstract io. Doc from io. Returns the default scheme, which will be used to construct a URI when
| |
| newNameResolver | back to summary |
|---|---|
| public NameResolver newNameResolver(URI targetUri, NameResolver. Implements abstract io. Doc from io. Creates a
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public int | getPriority(NameResolverProvider provider)
Implements io. |
| public boolean | isAvailable(NameResolverProvider provider)
Implements io. |
| NameResolverPriorityAccessor | back to summary |
|---|---|
| private NameResolverPriorityAccessor() | |
| getPriority | back to summary |
|---|---|
| public int getPriority(NameResolverProvider 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(NameResolverProvider provider) Implements io. Doc from io. Checks this provider is available for use, taking the current environment into consideration.
If
| |