Package io.quarkus.registry.client
Class RegistryClientDispatcher
- java.lang.Object
-
- io.quarkus.registry.client.RegistryClientDispatcher
-
- All Implemented Interfaces:
RegistryCache,RegistryClient,RegistryConfigResolver,RegistryNonPlatformExtensionsResolver,RegistryPlatformExtensionsResolver,RegistryPlatformsResolver
public class RegistryClientDispatcher extends Object implements RegistryClient
-
-
Field Summary
Fields Modifier and Type Field Description protected RegistryConfigconfig
-
Constructor Summary
Constructors Constructor Description RegistryClientDispatcher(RegistryConfig config, RegistryPlatformsResolver platforms, RegistryPlatformExtensionsResolver platformExtensions, RegistryNonPlatformExtensionsResolver nonPlatformExtensions)RegistryClientDispatcher(RegistryConfig config, RegistryPlatformsResolver platforms, RegistryPlatformExtensionsResolver platformExtensions, RegistryNonPlatformExtensionsResolver nonPlatformExtensions, RegistryCache registryCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearCache()ExtensionCatalog.MutableresolveNonPlatformExtensions(String quarkusVersion)Returns a catalog of extensions that are compatible with a given Quarkus version or null, in case the registry does not include any extension that is compatible with the given Quarkus version.ExtensionCatalog.MutableresolvePlatformExtensions(io.quarkus.maven.dependency.ArtifactCoords platformCoords)Returns a catalog of extensions that represents a given platform.PlatformCatalog.MutableresolvePlatforms(String quarkusVersion)Returns a catalog of the recommended platform versions, indicating which one of them is the default one for new project creation, for a given Quarkus version or in general, in case the caller did not provide any specific Quarkus version.RegistryConfigresolveRegistryConfig()Returns the complete registry configuration.
-
-
-
Field Detail
-
config
protected RegistryConfig config
-
-
Constructor Detail
-
RegistryClientDispatcher
public RegistryClientDispatcher(RegistryConfig config, RegistryPlatformsResolver platforms, RegistryPlatformExtensionsResolver platformExtensions, RegistryNonPlatformExtensionsResolver nonPlatformExtensions)
-
RegistryClientDispatcher
public RegistryClientDispatcher(RegistryConfig config, RegistryPlatformsResolver platforms, RegistryPlatformExtensionsResolver platformExtensions, RegistryNonPlatformExtensionsResolver nonPlatformExtensions, RegistryCache registryCache)
-
-
Method Detail
-
resolvePlatforms
public PlatformCatalog.Mutable resolvePlatforms(String quarkusVersion) throws RegistryResolutionException
Description copied from interface:RegistryPlatformsResolverReturns a catalog of the recommended platform versions, indicating which one of them is the default one for new project creation, for a given Quarkus version or in general, in case the caller did not provide any specific Quarkus version.- Specified by:
resolvePlatformsin interfaceRegistryPlatformsResolver- Parameters:
quarkusVersion- Quarkus version or null- Returns:
- catalog of the recommended platform versions
- Throws:
RegistryResolutionException- in case of a failure
-
resolvePlatformExtensions
public ExtensionCatalog.Mutable resolvePlatformExtensions(io.quarkus.maven.dependency.ArtifactCoords platformCoords) throws RegistryResolutionException
Description copied from interface:RegistryPlatformExtensionsResolverReturns a catalog of extensions that represents a given platform.- Specified by:
resolvePlatformExtensionsin interfaceRegistryPlatformExtensionsResolver- Parameters:
platformCoords- either a BOM or a JSON descriptor coordinates- Returns:
- catalog of extensions that represents the platform
- Throws:
RegistryResolutionException- in case of a failure
-
resolveNonPlatformExtensions
public ExtensionCatalog.Mutable resolveNonPlatformExtensions(String quarkusVersion) throws RegistryResolutionException
Description copied from interface:RegistryNonPlatformExtensionsResolverReturns a catalog of extensions that are compatible with a given Quarkus version or null, in case the registry does not include any extension that is compatible with the given Quarkus version.- Specified by:
resolveNonPlatformExtensionsin interfaceRegistryNonPlatformExtensionsResolver- Parameters:
quarkusVersion- Quarkus version- Returns:
- catalog of extensions compatible with a given Quarkus version or null
- Throws:
RegistryResolutionException- in case of a failure
-
resolveRegistryConfig
public RegistryConfig resolveRegistryConfig() throws RegistryResolutionException
Description copied from interface:RegistryConfigResolverReturns the complete registry configuration. The idea is that the default configuration to communicate with the registry will be provided by the registry admins for all users. Users though will still have a chance to adjust certain config options on the client side.- Specified by:
resolveRegistryConfigin interfaceRegistryConfigResolver- Returns:
- complete registry configuration
- Throws:
RegistryResolutionException- in case of a failure
-
clearCache
public void clearCache() throws RegistryResolutionException- Specified by:
clearCachein interfaceRegistryCache- Throws:
RegistryResolutionException
-
-