Search in sources :

Example 1 with DataFormatResolver

use of org.apache.camel.spi.DataFormatResolver in project camel by apache.

the class BlueprintDataFormatResolver method resolveDataFormat.

@Override
public DataFormat resolveDataFormat(String name, CamelContext context) {
    DataFormat dataFormat = null;
    DataFormatResolver resolver = context.getRegistry().lookupByNameAndType(".camelBlueprint.dataformatResolver." + name, DataFormatResolver.class);
    if (resolver != null) {
        LOG.debug("Found dataformat resolver: {} in registry: {}", name, resolver);
        dataFormat = resolver.resolveDataFormat(name, context);
    }
    if (dataFormat == null) {
        dataFormat = super.resolveDataFormat(name, context);
    }
    return dataFormat;
}
Also used : DataFormatResolver(org.apache.camel.spi.DataFormatResolver) OsgiDataFormatResolver(org.apache.camel.core.osgi.OsgiDataFormatResolver) DataFormat(org.apache.camel.spi.DataFormat)

Aggregations

OsgiDataFormatResolver (org.apache.camel.core.osgi.OsgiDataFormatResolver)1 DataFormat (org.apache.camel.spi.DataFormat)1 DataFormatResolver (org.apache.camel.spi.DataFormatResolver)1