use of org.apache.camel.language.property.ExchangePropertyLanguage in project camel by apache.
the class ExchangePropertyLanguageAutoConfiguration method configureExchangePropertyLanguage.
@Bean(name = "exchangeProperty-language")
@Scope("prototype")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean(ExchangePropertyLanguage.class)
public ExchangePropertyLanguage configureExchangePropertyLanguage(CamelContext camelContext, ExchangePropertyLanguageConfiguration configuration) throws Exception {
ExchangePropertyLanguage language = new ExchangePropertyLanguage();
if (CamelContextAware.class.isAssignableFrom(ExchangePropertyLanguage.class)) {
CamelContextAware contextAware = CamelContextAware.class.cast(language);
if (contextAware != null) {
contextAware.setCamelContext(camelContext);
}
}
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null, false);
IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), language, parameters);
return language;
}
use of org.apache.camel.language.property.ExchangePropertyLanguage in project camel by apache.
the class PropertyTest method testSingleton.
public void testSingleton() {
ExchangePropertyLanguage prop = new ExchangePropertyLanguage();
assertTrue(prop.isSingleton());
}
Aggregations