Package org.apache.camel.catalog
Interface VersionManager
-
- All Known Implementing Classes:
DefaultVersionManager
public interface VersionManager
Strategy to manage and load Camel versions the catalog uses.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassLoader
getClassLoader()
Gets the class loader that is able to load classes and resources from the catalog.String
getLoadedVersion()
Gets the current loaded Camel version used by the catalog.InputStream
getResourceAsStream(String name)
Returns an input stream for reading the specified resource from the loaded Catalog version.String
getRuntimeProviderLoadedVersion()
Gets the current loaded runtime provider version used by the catalog.boolean
loadRuntimeProviderVersion(String groupId, String artifactId, String version)
Attempt to load the runtime provider version to be used by the catalog.boolean
loadVersion(String version)
Attempt to load the Camel version to be used by the catalog.void
setClassLoader(ClassLoader classLoader)
Sets an extra class loader to use first for loading resources.
-
-
-
Method Detail
-
setClassLoader
void setClassLoader(ClassLoader classLoader)
Sets an extra class loader to use first for loading resources.
-
getClassLoader
ClassLoader getClassLoader()
Gets the class loader that is able to load classes and resources from the catalog.
-
getLoadedVersion
String getLoadedVersion()
Gets the current loaded Camel version used by the catalog.
-
loadVersion
boolean loadVersion(String version)
Attempt to load the Camel version to be used by the catalog. Loading the camel-catalog JAR of the given version of choice may require internet access to download the JAR from Maven central. You can pre download the JAR and install in a local Maven repository to avoid internet access for offline environments.- Parameters:
version
- the Camel version such as 2.17.1- Returns:
- true if the version was loaded, false if not.
-
getRuntimeProviderLoadedVersion
String getRuntimeProviderLoadedVersion()
Gets the current loaded runtime provider version used by the catalog.
-
loadRuntimeProviderVersion
boolean loadRuntimeProviderVersion(String groupId, String artifactId, String version)
Attempt to load the runtime provider version to be used by the catalog. Loading the runtime provider JAR of the given version of choice may require internet access to download the JAR from Maven central. You can pre download the JAR and install in a local Maven repository to avoid internet access for offline environments.- Parameters:
groupId
- the runtime provider Maven groupIdartifactId
- the runtime provider Maven artifactIdversion
- the runtime provider Maven version- Returns:
- true if the version was loaded, false if not.
-
getResourceAsStream
InputStream getResourceAsStream(String name)
Returns an input stream for reading the specified resource from the loaded Catalog version.- Parameters:
name
- the resource name- Returns:
- the stream if found, or null if not found.
-
-