本文整理汇总了Java中org.apache.camel.util.ObjectHelper类的典型用法代码示例。如果您正苦于以下问题:Java ObjectHelper类的具体用法?Java ObjectHelper怎么用?Java ObjectHelper使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ObjectHelper类属于org.apache.camel.util包,在下文中一共展示了ObjectHelper类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: listObjects
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Override
public ObjectListing listObjects(ListObjectsRequest listObjectsRequest) throws AmazonClientException, AmazonServiceException {
if ("nonExistingBucket".equals(listObjectsRequest.getBucketName()) && !nonExistingBucketCreated) {
AmazonServiceException ex = new AmazonServiceException("Unknown bucket");
ex.setStatusCode(404);
throw ex;
}
int capacity;
ObjectListing objectListing = new ObjectListing();
if (!ObjectHelper.isEmpty(listObjectsRequest.getMaxKeys()) && listObjectsRequest.getMaxKeys() != null) {
capacity = listObjectsRequest.getMaxKeys();
} else {
capacity = maxCapacity;
}
for (int index = 0; index < objects.size() && index < capacity; index++) {
S3ObjectSummary s3ObjectSummary = new S3ObjectSummary();
s3ObjectSummary.setBucketName(objects.get(index).getBucketName());
s3ObjectSummary.setKey(objects.get(index).getKey());
objectListing.getObjectSummaries().add(s3ObjectSummary);
}
return objectListing;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:26,代码来源:AmazonS3ClientMock.java
示例2: handle
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Override
public ProcessorDefinition handle(Choice step, ProcessorDefinition route, SyndesisRouteBuilder routeBuilder) {
final CamelContext context = routeBuilder.getContext();
final ChoiceDefinition choice = route.choice();
List<Filter> filters = ObjectHelper.supplyIfEmpty(step.getFilters(), Collections::emptyList);
for (Filter filter : filters) {
Predicate predicate = JsonSimpleHelpers.getMandatorySimplePredicate(context, filter, filter.getExpression());
ChoiceDefinition when = choice.when(predicate);
route = routeBuilder.addSteps(when, filter.getSteps());
}
Otherwise otherwiseStep = step.getOtherwise();
if (otherwiseStep != null) {
List<Step> otherwiseSteps = ObjectHelper.supplyIfEmpty(otherwiseStep.getSteps(), Collections::emptyList);
if (!otherwiseSteps.isEmpty()) {
route = routeBuilder.addSteps(choice.otherwise(), otherwiseSteps);
}
}
return route;
}
开发者ID:syndesisio,项目名称:syndesis-integration-runtime,代码行数:24,代码来源:ChoiceHandler.java
示例3: handle
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Override
public Optional<ProcessorDefinition> handle(Choice step, ProcessorDefinition route, SyndesisRouteBuilder routeBuilder) {
final CamelContext context = routeBuilder.getContext();
final ChoiceDefinition choice = route.choice();
List<Filter> filters = ObjectHelper.supplyIfEmpty(step.getFilters(), Collections::<Filter>emptyList);
for (Filter filter : filters) {
Predicate predicate = JsonSimpleHelpers.getMandatorySimplePredicate(context, filter, filter.getExpression());
ChoiceDefinition when = choice.when(predicate);
routeBuilder.addSteps(when, filter.getSteps());
}
Otherwise otherwiseStep = step.getOtherwise();
if (otherwiseStep != null) {
List<Step> otherwiseSteps = ObjectHelper.supplyIfEmpty(otherwiseStep.getSteps(), Collections::<Step>emptyList);
if (!otherwiseSteps.isEmpty()) {
routeBuilder.addSteps(choice.otherwise(), otherwiseSteps);
}
}
return Optional.empty();
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:24,代码来源:ChoiceHandler.java
示例4: buildUri
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
private static String buildUri(Endpoint step) {
String uri = step.getUri();
Map<String, Object> properties = step.getProperties();
if (!Strings.isEmpty(uri)) {
if (ObjectHelper.isNotEmpty(properties)) {
try {
uri = URISupport.appendParametersToURI(uri, properties);
} catch (UnsupportedEncodingException|URISyntaxException e) {
throw ObjectHelper.wrapRuntimeCamelException(e);
}
}
}
return uri;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:17,代码来源:EndpointHandler.java
示例5: createEndpointUri
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Override
public String createEndpointUri(String scheme, Map<String, String> options) throws URISyntaxException {
// FIXME: SpringBootAutoConfigurationMojo MUST not ignore connectorOptions
brokerUrl = options.remove("brokerUrl");
username = options.remove("username");
password = options.remove("password");
// validate url
if (ObjectHelper.isEmpty(this.brokerUrl)) {
throw new IllegalArgumentException("Missing required property brokerUrl");
}
// create ActiveMQ Connection Factory
ActiveMQConnectionFactory connectionFactory = ObjectHelper.isEmpty(username) ?
new ActiveMQConnectionFactory(this.brokerUrl) : new ActiveMQConnectionFactory(username, password, this.brokerUrl);
Sjms2Component delegate = getCamelContext().getComponent(getComponentName() + "-component", Sjms2Component.class);
delegate.setConnectionFactory(connectionFactory);
return super.createEndpointUri(scheme, options);
}
开发者ID:syndesisio,项目名称:connectors,代码行数:22,代码来源:AbstractActiveMQConnector.java
示例6: configureSalesforceDeleteSObjectComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "salesforce-delete-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceDeleteSObjectComponent configureSalesforceDeleteSObjectComponent()
throws Exception {
SalesforceDeleteSObjectComponent connector = new SalesforceDeleteSObjectComponent();
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<SalesforceDeleteSObjectComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-delete-sobject.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-delete-sobject.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceDeleteSObjectConnectorAutoConfiguration.java
示例7: configureSalesforceUpsertSObjectComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "salesforce-upsert-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceUpsertSObjectComponent configureSalesforceUpsertSObjectComponent()
throws Exception {
SalesforceUpsertSObjectComponent connector = new SalesforceUpsertSObjectComponent();
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<SalesforceUpsertSObjectComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-upsert-sobject.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-upsert-sobject.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceUpsertSObjectConnectorAutoConfiguration.java
示例8: configureSalesforceGetSObjectComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "salesforce-get-sobject-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceGetSObjectComponent configureSalesforceGetSObjectComponent()
throws Exception {
SalesforceGetSObjectComponent connector = new SalesforceGetSObjectComponent();
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<SalesforceGetSObjectComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-get-sobject.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-get-sobject.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceGetSObjectConnectorAutoConfiguration.java
示例9: configureTradeInsightBuyComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的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;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:TradeInsightBuyConnectorAutoConfiguration.java
示例10: configureDayTradePlaceComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的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;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:DayTradePlaceConnectorAutoConfiguration.java
示例11: configureTradeInsightTopComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的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;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:36,代码来源:TradeInsightTopConnectorAutoConfiguration.java
示例12: configureHttpPostComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "http-post-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public HttpPostComponent configureHttpPostComponent() throws Exception {
HttpPostComponent connector = new HttpPostComponent();
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<HttpPostComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.http-post-connector.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.http-post-connector.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:HttpPostConnectorAutoConfiguration.java
示例13: configureSwaggerConnectorComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的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;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:SwaggerConnectorConnectorAutoConfiguration.java
示例14: configureActiveMQRequestComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "activemq-request-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public ActiveMQRequestComponent configureActiveMQRequestComponent()
throws Exception {
ActiveMQRequestComponent connector = new ActiveMQRequestComponent();
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<ActiveMQRequestComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-request.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-request.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:ActiveMQRequestConnectorAutoConfiguration.java
示例15: configureSqlStoredConnectorComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的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;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SqlStoredConnectorConnectorAutoConfiguration.java
示例16: configureSalesforceGetSObjectWithIdComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "salesforce-get-sobject-with-id-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SalesforceGetSObjectWithIdComponent configureSalesforceGetSObjectWithIdComponent()
throws Exception {
SalesforceGetSObjectWithIdComponent connector = new SalesforceGetSObjectWithIdComponent();
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<SalesforceGetSObjectWithIdComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-get-sobject-with-id.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.salesforce-get-sobject-with-id.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:connectors,代码行数:37,代码来源:SalesforceGetSObjectWithIdConnectorAutoConfiguration.java
示例17: configureActiveMQRespondComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "activemq-respond-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public ActiveMQRespondComponent configureActiveMQRespondComponent()
throws Exception {
ActiveMQRespondComponent connector = new ActiveMQRespondComponent();
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<ActiveMQRespondComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-respond.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.activemq-respond.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:ActiveMQRespondConnectorAutoConfiguration.java
示例18: configureActiveMQPublishComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的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;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:36,代码来源:ActiveMQPublishConnectorAutoConfiguration.java
示例19: createEndpointUri
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Override
public String createEndpointUri(String scheme, Map<String, String> options) throws URISyntaxException {
// validate url
if (ObjectHelper.isEmpty(this.brokerUrl)) {
throw new IllegalArgumentException("Missing required property brokerUrl");
}
// create ActiveMQ Connection Factory
final ActiveMQConnectionFactory connectionFactory = ActiveMQUtil.createActiveMQConnectionFactory(this.brokerUrl, username, this.password, this.brokerCertificate, clientCertificate, skipCertificateCheck);
SjmsComponent delegate = getCamelContext().getComponent(scheme, SjmsComponent.class);
delegate.setConnectionFactory(connectionFactory);
return super.createEndpointUri(scheme, options);
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:16,代码来源:AbstractActiveMQConnector.java
示例20: configureSqlStartConnectorComponent
import org.apache.camel.util.ObjectHelper; //导入依赖的package包/类
@Lazy
@Bean(name = "sql-start-connector-component")
@ConditionalOnClass(CamelContext.class)
@ConditionalOnMissingBean
public SqlStartConnectorComponent configureSqlStartConnectorComponent()
throws Exception {
SqlStartConnectorComponent connector = new SqlStartConnectorComponent();
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<SqlStartConnectorComponent> customizer : customizers) {
boolean useCustomizer = (customizer instanceof HasId)
? HierarchicalPropertiesEvaluator
.evaluate(
applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.sql-start-connector.customizer",
((HasId) customizer).getId())
: HierarchicalPropertiesEvaluator
.evaluate(applicationContext.getEnvironment(),
"camel.connector.customizer",
"camel.connector.sql-start-connector.customizer");
if (useCustomizer) {
LOGGER.debug("Configure connector {}, with customizer {}",
connector, customizer);
customizer.customize(connector);
}
}
}
return connector;
}
开发者ID:syndesisio,项目名称:syndesis,代码行数:37,代码来源:SqlStartConnectorConnectorAutoConfiguration.java
注:本文中的org.apache.camel.util.ObjectHelper类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论