本文整理汇总了Java中org.apache.camel.util.IntrospectionSupport类的典型用法代码示例。如果您正苦于以下问题:Java IntrospectionSupport类的具体用法?Java IntrospectionSupport怎么用?Java IntrospectionSupport使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IntrospectionSupport类属于org.apache.camel.util包,在下文中一共展示了IntrospectionSupport类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: determineHeaders
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
Map<String, Object> determineHeaders(final Map<String, Object> parameters) {
final Map<String, Object> headers = new HashMap<>();
final ClassInfo classInfo = IntrospectionSupport.cacheClass(RestSwaggerEndpoint.class);
final Set<String> knownParameters = Arrays.stream(classInfo.methods).map(i -> i.getterOrSetterShorthandName)
.filter(Objects::nonNull).collect(Collectors.toSet());
for (final Iterator<Entry<String, Object>> i = parameters.entrySet().iterator(); i.hasNext();) {
final Entry<String, Object> entry = i.next();
final String name = entry.getKey();
if (!knownParameters.contains(name)) {
headers.put(name, entry.getValue());
i.remove();
}
}
addAuthenticationHeadersTo(headers);
return headers;
}
示例2: shouldPassSpecificationToRestSwaggerComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Test
public void shouldPassSpecificationToRestSwaggerComponent() throws Exception {
final Component component = camelContext.getComponent("swagger-operation");
assertThat(component).isNotNull();
final String specification = IOUtils.toString(SwaggerConnectorComponentTest.class.getResource("/petstore.json"),
StandardCharsets.UTF_8);
IntrospectionSupport.setProperties(component, new HashMap<>(Collections.singletonMap("specification", specification)));
final Endpoint endpoint = component.createEndpoint("swagger-operation://?operationId=addPet");
assertThat(endpoint).isNotNull();
final Optional<RestSwaggerEndpoint> maybeRestSwagger = camelContext.getEndpoints().stream()
.filter(RestSwaggerEndpoint.class::isInstance).map(RestSwaggerEndpoint.class::cast).findFirst();
assertThat(maybeRestSwagger).hasValueSatisfying(restSwagger -> {
assertThat(restSwagger.getSpecificationUri()).isNotNull();
assertThat(restSwagger.getOperationId()).isEqualTo("addPet");
});
}
示例3: configureTradeInsightTopComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "trade-insight-top-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public TradeInsightTopComponent configureTradeInsightTopComponent()
throws Exception {
TradeInsightTopComponent connector = new TradeInsightTopComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<TradeInsightTopComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.trade-insight-top.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.trade-insight-top.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例4: configureSalesforceUpdateSObjectComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "salesforce-update-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceUpdateSObjectComponent configureSalesforceUpdateSObjectComponent()
throws Exception {
SalesforceUpdateSObjectComponent connector = new SalesforceUpdateSObjectComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<SalesforceUpdateSObjectComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-update-sobject.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-update-sobject.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceUpdateSObjectConnectorAutoConfiguration.java
示例5: configureTradeInsightBuyComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "trade-insight-buy-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public TradeInsightBuyComponent configureTradeInsightBuyComponent()
throws Exception {
TradeInsightBuyComponent connector = new TradeInsightBuyComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<TradeInsightBuyComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.trade-insight-buy.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.trade-insight-buy.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例6: configureDayTradePlaceComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "day-trade-place-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public DayTradePlaceComponent configureDayTradePlaceComponent()
throws Exception {
DayTradePlaceComponent connector = new DayTradePlaceComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<DayTradePlaceComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.day-trade-place.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.day-trade-place.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例7: configureDayTradeGetComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "day-trade-get-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public DayTradeGetComponent configureDayTradeGetComponent()
throws Exception {
DayTradeGetComponent connector = new DayTradeGetComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<DayTradeGetComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.day-trade-get.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.day-trade-get.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例8: configureSwaggerConnectorComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "swagger-operation-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SwaggerConnectorComponent configureSwaggerConnectorComponent()
throws Exception {
SwaggerConnectorComponent connector = new SwaggerConnectorComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<SwaggerConnectorComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.swagger-operation.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.swagger-operation.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例9: configureHttpGetComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "http-get-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public HttpGetComponent configureHttpGetComponent() throws Exception {
HttpGetComponent connector = new HttpGetComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<HttpGetComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.http-get-connector.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.http-get-connector.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例10: configureActiveMQSubscribeComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "activemq-subscribe-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public ActiveMQSubscribeComponent configureActiveMQSubscribeComponent()
throws Exception {
ActiveMQSubscribeComponent connector = new ActiveMQSubscribeComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<ActiveMQSubscribeComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-subscribe.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-subscribe.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例11: configureActiveMQPublishComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "activemq-publish-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public ActiveMQPublishComponent configureActiveMQPublishComponent()
throws Exception {
ActiveMQPublishComponent connector = new ActiveMQPublishComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<ActiveMQPublishComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-publish.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-publish.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例12: configureSalesforceOnUpdateComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "salesforce-on-update-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceOnUpdateComponent configureSalesforceOnUpdateComponent()
throws Exception {
SalesforceOnUpdateComponent connector = new SalesforceOnUpdateComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<SalesforceOnUpdateComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-on-update.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-on-update.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例13: configureSqlConnectorComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "sql-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SqlConnectorComponent configureSqlConnectorComponent()
throws Exception {
SqlConnectorComponent connector = new SqlConnectorComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<SqlConnectorComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.sql-connector.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.sql-connector.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例14: configureSqlStoredConnectorComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "sql-stored-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SqlStoredConnectorComponent configureSqlStoredConnectorComponent()
throws Exception {
SqlStoredConnectorComponent connector = new SqlStoredConnectorComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<SqlStoredConnectorComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.sql-stored-connector.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.sql-stored-connector.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
示例15: configureODataDeleteEntityComponent
import org.apache.camel.util.IntrospectionSupport; //导入依赖的package包/类
@Lazy
@Bean(name = "odata-delete-entity-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public ODataDeleteEntityComponent configureODataDeleteEntityComponent()
throws Exception {
ODataDeleteEntityComponent connector = new ODataDeleteEntityComponent();
connector.setCamelContext(camelContext);
Map<String, Object> parameters = new HashMap<>();
IntrospectionSupport.getProperties(configuration, parameters, null,
false);
CamelPropertiesHelper.setCamelProperties(camelContext, connector,
parameters, false);
connector.setOptions(parameters);
if (ObjectHelper.isNotEmpty(customizers)) {
for (ConnectorCustomizer<ODataDeleteEntityComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.odata-delete-entity.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.odata-delete-entity.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}