Package org.apache.camel.spi
Interface FactoryFinder
public interface FactoryFinder
Finder to find factories from the resource classpath, usually META-INF/services/org/apache/camel/.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionFinds 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
String getResourcePath()Gets the resource classpath.- Returns:
- the resource classpath.
-
newInstance
Creates a new class instance using the key to lookup- Parameters:
key- is the key to add to the path to find a text file containing the factory name- Returns:
- a newly created instance (if exists)
-
newInstance
Creates a new class instance using the key to lookup- Parameters:
key- is the key to add to the path to find a text file containing the factory nametype- the class type- Returns:
- a newly created instance (if exists)
-
findClass
Finds the given factory class using the key to lookup.- Parameters:
key- is the key to add to the path to find a text file containing the factory name- Returns:
- the factory class
-
findOptionalClass
Finds the optional factory class using the key to lookup.- Parameters:
key- is the key to add to the path to find a text file containing the factory name- Returns:
- the factory class if found, or null if no class existed
-