/** * Return all configuration properties on a map. * * @return */ public Map<String, Object> asMap() { final Map<String, Object> map = new HashMap<>(); IntrospectionSupport.getProperties(this, map, null); return map; }
public static void getEndpointProperties(FacebookEndpointConfiguration configuration, Map<String, Object> properties) { if (IntrospectionSupport.getProperties(configuration, properties, null, false)) { final Set<String> names = properties.keySet(); // remove component config properties so we only have endpoint properties names.removeAll(COMPONENT_CONFIG_FIELDS); } if (LOG.isDebugEnabled()) { final Set<String> names = properties.keySet(); LOG.debug("Found endpoint properties {}", names.retainAll(ENDPOINT_CONFIG_FIELDS)); } }
@Bean(name = "lra-service") @ConditionalOnMissingBean(CamelSagaService.class) @ConditionalOnProperty(value = "camel.service.lra.enabled", havingValue = "true") public LRASagaService configureLraSagaService() throws Exception { LRASagaService service = new LRASagaService(); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, service, parameters, false); camelContext.addService(service); return service; } }
@Bean(name = HystrixConstants.DEFAULT_HYSTRIX_CONFIGURATION_ID) @ConditionalOnClass(CamelContext.class) @ConditionalOnMissingBean(name = HystrixConstants.DEFAULT_HYSTRIX_CONFIGURATION_ID) public HystrixConfigurationDefinition defaultHystrixConfigurationDefinition() throws Exception { Map<String, Object> properties = new HashMap<>(); IntrospectionSupport.getProperties(config, properties, null, false); HystrixConfigurationDefinition definition = new HystrixConfigurationDefinition(); IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), definition, properties); return definition; }
private WordpressComponentConfiguration copyComponentProperties() throws Exception { Map<String, Object> componentProperties = new HashMap<>(); IntrospectionSupport.getProperties(configuration, componentProperties, null, false); // create endpoint configuration with component properties WordpressComponentConfiguration config = new WordpressComponentConfiguration(); IntrospectionSupport.setProperties(config, componentProperties); return config; } }
private FacebookEndpointConfiguration copyComponentProperties() throws Exception { Map<String, Object> componentProperties = new HashMap<>(); IntrospectionSupport.getProperties(configuration, componentProperties, null, false); // create endpoint configuration with component properties FacebookEndpointConfiguration config = new FacebookEndpointConfiguration(); IntrospectionSupport.setProperties(config, componentProperties); return config; }
IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, language,
IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, language,
IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, language,
IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, language,
@PostConstruct public void postConstruct() { if (beanFactory != null) { Map<String, Object> parameters = new HashMap<>(); for (Map.Entry<String, RibbonServiceCallServiceLoadBalancerConfigurationCommon> entry : configuration.getConfigurations().entrySet()) { // clean up params parameters.clear(); // The instance factory RibbonServiceLoadBalancerFactory factory = new RibbonServiceLoadBalancerFactory(); try { IntrospectionSupport.getProperties(entry.getValue(), parameters, null, false); IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), factory, parameters); beanFactory.registerSingleton(entry.getKey(), factory.newInstance(camelContext)); } catch (Exception e) { throw new BeanCreationException(entry.getKey(), e.getMessage(), e); } } } }
@PostConstruct public void postConstruct() { if (beanFactory != null) { Map<String, Object> parameters = new HashMap<>(); for (Map.Entry<String, DnsServiceCallServiceDiscoveryConfigurationCommon> entry : configuration.getConfigurations().entrySet()) { // clean up params parameters.clear(); // The instance factory DnsServiceDiscoveryFactory factory = new DnsServiceDiscoveryFactory(); try { IntrospectionSupport.getProperties(entry.getValue(), parameters, null, false); IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), factory, parameters); beanFactory.registerSingleton(entry.getKey(), factory.newInstance(camelContext)); } catch (Exception e) { throw new BeanCreationException(entry.getKey(), e.getMessage(), e); } } } }
connector.setCamelContext(camelContext); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, connector,
connector.setCamelContext(camelContext); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, connector,
connector.setCamelContext(camelContext); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, connector,
connector.setCamelContext(camelContext); Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration, parameters, null, false); CamelPropertiesHelper.setCamelProperties(camelContext, connector,
@PostConstruct public void postConstruct() { if (beanFactory == null) { return; } Map<String, Object> properties = new HashMap<>(); for (Map.Entry<String, HystrixConfigurationDefinitionCommon> entry : config.getConfigurations().entrySet()) { // clear the properties map for reuse properties.clear(); // extract properties IntrospectionSupport.getProperties(entry.getValue(), properties, null, false); try { HystrixConfigurationDefinition definition = new HystrixConfigurationDefinition(); IntrospectionSupport.setProperties(camelContext, camelContext.getTypeConverter(), definition, properties); // Registry the definition beanFactory.registerSingleton(entry.getKey(), definition); } catch (Exception e) { throw new BeanCreationException(entry.getKey(), e); } } } }
@Lazy @Bean @ConditionalOnMissingBean @ConditionalOnClass(CamelContext.class) public CamelReactiveStreamsService camelReactiveStreamsService() throws Exception { ReactiveStreamsEngineConfiguration engineConfiguration = new ReactiveStreamsEngineConfiguration(); if (configuration.getInternalEngineConfiguration() != null) { Map<String, Object> parameters = new HashMap<>(); IntrospectionSupport.getProperties(configuration.getInternalEngineConfiguration(), parameters, null, false); IntrospectionSupport.setProperties(context, context.getTypeConverter(), engineConfiguration, parameters); } return ReactiveStreamsHelper.resolveReactiveStreamsService(context, configuration.getServiceType(), engineConfiguration); }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { NettyConfiguration config; if (configuration != null) { config = configuration.copy(); } else { config = new NettyConfiguration(); } config = parseConfiguration(config, remaining, parameters); // merge any custom bootstrap configuration on the config NettyServerBootstrapConfiguration bootstrapConfiguration = resolveAndRemoveReferenceParameter(parameters, "bootstrapConfiguration", NettyServerBootstrapConfiguration.class); if (bootstrapConfiguration != null) { Map<String, Object> options = new HashMap<>(); if (IntrospectionSupport.getProperties(bootstrapConfiguration, options, null, false)) { IntrospectionSupport.setProperties(getCamelContext().getTypeConverter(), config, options); } } if (config.getSslContextParameters() == null) { config.setSslContextParameters(retrieveGlobalSslContextParameters()); } // validate config config.validateConfiguration(); NettyEndpoint nettyEndpoint = new NettyEndpoint(remaining, this, config); setProperties(nettyEndpoint.getConfiguration(), parameters); return nettyEndpoint; }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { NettyConfiguration config; if (configuration != null) { config = configuration.copy(); } else { config = new NettyConfiguration(); } config = parseConfiguration(config, remaining, parameters); // merge any custom bootstrap configuration on the config NettyServerBootstrapConfiguration bootstrapConfiguration = resolveAndRemoveReferenceParameter(parameters, "bootstrapConfiguration", NettyServerBootstrapConfiguration.class); if (bootstrapConfiguration != null) { Map<String, Object> options = new HashMap<>(); if (IntrospectionSupport.getProperties(bootstrapConfiguration, options, null, false)) { IntrospectionSupport.setProperties(getCamelContext().getTypeConverter(), config, options); } } if (config.getSslContextParameters() == null) { config.setSslContextParameters(retrieveGlobalSslContextParameters()); } // validate config config.validateConfiguration(); NettyEndpoint nettyEndpoint = new NettyEndpoint(remaining, this, config); nettyEndpoint.setTimer(getTimer()); setProperties(nettyEndpoint.getConfiguration(), parameters); return nettyEndpoint; }