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.

@FunctionalInterface public interface TransformerResolver<K>
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 Type
    Method
    Description
    default String
    normalize(K key)
    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

      Transformer resolve(K key, CamelContext camelContext)
      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

      default String normalize(K key)
      Normalize transformer key to conform with factory finder resource path. Replaces all non supported characters such as slashes and colons to dashes.
      Parameters:
      key - the transformer key
      Returns:
      normalized String representation of the key