Class ComponentManager
java.lang.Object
org.talend.sdk.component.runtime.manager.ComponentManager
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic enumstatic interfaceWARNING: internal extension point, use it only if you really understand what it implies.static interfaceWARNING: use with caution and only if you fully understand the consequences.static class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionComponentManager(File m2) ComponentManager(File m2, String dependenciesResource, String jmxNamePattern) ComponentManager(Path m2) ComponentManager(Path m2, String dependenciesResource, String jmxNamePattern) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddJarContaining(ClassLoader loader, String resource) protected StringaddWithLocationPlugin(String location, String pluginRootFile) voidautoDiscoverPlugins(boolean callers, boolean classpath) voidclose()protected voidcontainerServices(Container container, Map<Class<?>, Object> services) protected static AtomicReference<ComponentManager>For test purpose only.createComponent(String plugin, String name, ComponentManager.ComponentType componentType, int version, Map<String, String> configuration) protected static Collection<org.talend.sdk.component.api.service.configuration.LocalConfiguration><T> Stream<T>findCheckpointParameterMeta(String plugin, String name) findConfigurationType(String plugin, String name, String configurationType) findDatasetParameterMeta(String plugin, String name) findDatastoreParameterMeta(String plugin, String name) Optional<org.talend.sdk.component.runtime.standalone.DriverRunner>static PathfindM2()Optional<org.talend.sdk.component.runtime.input.Mapper>findPlugin(String plugin) Optional<org.talend.sdk.component.runtime.output.Processor>booleanprotected voidstatic ComponentManagerinstance()Creates a default manager with default maven local repository, TALEND-INF/dependencies.txt file to find the dependencies of the plugins and a default JMX pattern for plugins.protected booleanisContainerClass(org.apache.xbean.finder.filter.Filter filter, String name) jsonToMap(javax.json.JsonValue jsonValue) Convert a json value to a configuration map.Convert a json value to a configuration map.mergeCheckpointConfiguration(String plugin, String name, ComponentManager.ComponentType componentType, Map<String, String> configuration) voidremovePlugin(String id) Replace some keys in the configuration map.
-
Field Details
-
container
-
-
Constructor Details
-
ComponentManager
-
ComponentManager
-
ComponentManager
-
ComponentManager
- Parameters:
m2- the maven repository location if on the file system.dependenciesResource- the resource path containing dependencies.jmxNamePattern- a pattern to register the plugins (containers) in JMX, null otherwise.
-
-
Method Details
-
getLocalSupplier
-
instance
Creates a default manager with default maven local repository, TALEND-INF/dependencies.txt file to find the dependencies of the plugins and a default JMX pattern for plugins. It also adds the caller as a plugin.- Returns:
- the contextual manager instance.
-
contextualInstance
For test purpose only.- Returns:
- the contextual instance
-
info
-
findM2
-
addCallerAsPlugin
-
addJarContaining
-
mergeCheckpointConfiguration
public Map<String,String> mergeCheckpointConfiguration(String plugin, String name, ComponentManager.ComponentType componentType, Map<String, String> configuration) -
findConfigurationType
-
findCheckpointParameterMeta
-
findDatasetParameterMeta
-
findDatastoreParameterMeta
-
jsonToMap
Convert a json value to a configuration map.- Parameters:
jsonValue- json value to convert to a configuration mappath- optional path to add to keys as prefix- Returns:
- a configuration map from a json value
-
jsonToMap
Convert a json value to a configuration map.- Parameters:
jsonValue- json value to convert to a configuration map- Returns:
- a configuration map from a json value
-
replaceKeys
public static Map<String,String> replaceKeys(Map<String, String> configuration, String oldPrefix, String newPrefix) Replace some keys in the configuration map.- Parameters:
configuration- original configurationoldPrefix- old prefix to replacenewPrefix- new prefix to replace with- Returns:
- Map with keys replaced
-
find
-
createComponent
public Optional<Object> createComponent(String plugin, String name, ComponentManager.ComponentType componentType, int version, Map<String, String> configuration) -
autoDiscoverPlugins
-
findMapper
-
findDriverRunner
-
findProcessor
-
hasPlugin
-
findPlugin
-
addPlugin
-
addWithLocationPlugin
-
addPlugin
-
removePlugin
-
isContainerClass
-
close
- Specified by:
closein interfaceAutoCloseable
-
availablePlugins
-
containerServices
-
createRawLocalConfigurations
protected static Collection<org.talend.sdk.component.api.service.configuration.LocalConfiguration> createRawLocalConfigurations()
-