Interface FactoryFinder
public interface FactoryFinder
Looks up and instantiates SPI factory classes declared in resource files on the classpath, following the
META-INF/services/org/apache/camel/ service-file convention used throughout Camel.
Each service file contains the fully-qualified class name of a factory implementation. Given a lookup key, the finder
appends the key to getResourcePath(), reads the file, loads the named class via the ClassResolver,
and instantiates it. This mechanism lets components and modules ship their implementations without explicit
registration; Camel discovers them automatically at startup via this discovery contract.
FactoryFinderResolver creates and caches FactoryFinder instances per resource path, so each distinct
path has exactly one finder for the lifetime of the CamelContext.- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear the resolver state from previous scans.Finds the given factory class using the key to lookup.findOptionalClass(String key) Finds the optional factory class using the key to lookup.Gets the resource classpath.newInstance(String key) Creates a new class instance using the key to lookup<T> Optional<T> newInstance(String key, Class<T> type) Creates a new class instance using the key to lookup
-
Field Details
-
DEFAULT_PATH
- See Also:
-
-
Method Details
-
getResourcePath
-
newInstance
-
newInstance
-
findClass
-
findOptionalClass
-
clear
void clear()Clear the resolver state from previous scans.
-