Package org.apache.camel.spi
Interface TransformerResolver<K>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Resolves data type transformers from given transformer key. This represents the opportunity to lazy load transformers
via factory finder discovery mechanism.
-
Method Summary
Modifier and TypeMethodDescriptiondefault String
Normalize transformer key to conform with factory finder resource path.resolve
(K key, CamelContext camelContext) Attempts to resolve the transformer for the given key.
-
Method Details
-
resolve
Attempts to resolve the transformer for the given key. Usually uses the factory finder URI to resolve the transformer by its name derived from the given key. Transformer names may use scheme and name as a combination in order to resolve component specific transformers. Usually implements a fallback resolving mechanism when no matching transformer is found (e.g. search for generic Camel transformers just using the name).- Parameters:
key
- the transformer key.camelContext
- the current Camel context.- Returns:
- data type transformer resolved via URI factory finder or null if not found.
-
normalize
Normalize transformer key to conform with factory finder resource path. Replaces all non supported characters such as slashes and colons to dashes. Automatically removes the default scheme prefix as it should not be part of the resource path.- Parameters:
key
- the transformer key- Returns:
- normalized String representation of the key
-