本文整理了Java中org.apache.camel.util.EndpointHelper.setReferenceProperties()方法的一些代码示例,展示了
本文整理了Java中org.apache.camel.util.EndpointHelper.setReferenceProperties()
方法的一些代码示例,展示了EndpointHelper.setReferenceProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EndpointHelper.setReferenceProperties()
方法的具体详情如下:
包路径:org.apache.camel.util.EndpointHelper
类名称:EndpointHelper
方法名:setReferenceProperties
EndpointHelper.setReferenceProperties介绍
暂无
代码示例
代码示例来源:origin: org.apache.camel/camel-ignite
@Deprecated
public IgniteQueueEndpoint(String endpointUri, URI remainingUri, Map parameters, IgniteComponent igniteComponent) throws Exception {
super(endpointUri, igniteComponent);
name = remainingUri.getHost();
ObjectHelper.notNull(name, "Queue name");
// Set the configuration values.
if (!parameters.containsKey("configuration")) {
Map cOnfigProps= IntrospectionSupport.extractProperties(parameters, "config.");
EndpointHelper.setReferenceProperties(this.getCamelContext(), configProps, parameters);
EndpointHelper.setProperties(this.getCamelContext(), configProps, parameters);
}
}
代码示例来源:origin: org.apache.camel/camel-ignite
@Deprecated
public IgniteSetEndpoint(String endpointUri, URI remainingUri, Map parameters, IgniteComponent igniteComponent) throws Exception {
super(endpointUri, igniteComponent);
name = remainingUri.getHost();
ObjectHelper.notNull(name, "Set name");
// Set the configuration values.
if (!parameters.containsKey("configuration")) {
Map cOnfigProps= IntrospectionSupport.extractProperties(parameters, "config.");
EndpointHelper.setReferenceProperties(this.getCamelContext(), configProps, parameters);
EndpointHelper.setProperties(this.getCamelContext(), configProps, parameters);
}
}
代码示例来源:origin: org.apache.camel/camel-cxf
public void setCamelContext(CamelContext c) {
super.setCamelContext(c);
if (this.properties != null) {
try {
EndpointHelper.setReferenceProperties(getCamelContext(),
this,
this.properties);
EndpointHelper.setProperties(getCamelContext(),
this,
this.properties);
} catch (Throwable e) {
// TODO: Why dont't we rethrown this exception
LOG.warn("Error setting CamelContext. This exception will be ignored.", e);
}
}
}
代码示例来源:origin: org.apache.camel/camel-ignite
public IgniteSetEndpoint(String endpointUri, String remaining, Map parameters, IgniteSetComponent igniteComponent) throws Exception {
super(endpointUri, igniteComponent);
name = remaining;
ObjectHelper.notNull(name, "Set name");
// Set the configuration values.
if (!parameters.containsKey("configuration")) {
Map cOnfigProps= IntrospectionSupport.extractProperties(parameters, "config.");
EndpointHelper.setReferenceProperties(this.getCamelContext(), configProps, parameters);
EndpointHelper.setProperties(this.getCamelContext(), configProps, parameters);
}
}
代码示例来源:origin: org.apache.camel/camel-cxf
/**
* To set additional CXF options using the key/value pairs from the Map.
* For example to turn on stacktraces in SOAP faults, properties.faultStackTraceEnabled=true
*/
public void setProperties(Map properties) {
if (this.properties == null) {
this.properties = properties;
} else {
this.properties.putAll(properties);
}
if (getCamelContext() != null && this.properties != null) {
try {
EndpointHelper.setReferenceProperties(getCamelContext(),
this,
this.properties);
EndpointHelper.setProperties(getCamelContext(),
this,
this.properties);
} catch (Throwable e) {
// TODO: Why dont't we rethrown this exception
LOG.warn("Error setting properties. This exception will be ignored.", e);
}
}
}
代码示例来源:origin: org.apache.camel/camel-ignite
public IgniteQueueEndpoint(String endpointUri, String remaining, Map parameters, IgniteQueueComponent igniteComponent) throws Exception {
super(endpointUri, igniteComponent);
name = remaining;
ObjectHelper.notNull(name, "Queue name");
// Set the configuration values.
if (!parameters.containsKey("configuration")) {
Map cOnfigProps= IntrospectionSupport.extractProperties(parameters, "config.");
EndpointHelper.setReferenceProperties(this.getCamelContext(), configProps, parameters);
EndpointHelper.setProperties(this.getCamelContext(), configProps, parameters);
}
}
代码示例来源:origin: org.apache.camel/camel-wordpress
@Override
public void configureProperties(Map options) {
super.configureProperties(options);
// set configuration properties first
try {
if (cOnfig== null) {
cOnfig= new WordpressComponentConfiguration();
}
EndpointHelper.setReferenceProperties(getCamelContext(), config, options);
EndpointHelper.setProperties(getCamelContext(), config, options);
if (config.getSearchCriteria() == null) {
final SearchCriteria searchCriteria = WordpressOperationType.valueOf(operation).getCriteriaType().newInstance();
Map criteriaOptiOns= IntrospectionSupport.extractProperties(options, "criteria.");
// any property that has a "," should be a List
criteriaOptiOns= criteriaOptions.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, e -> {
if (e != null && e.toString().indexOf(",") > -1) {
return Arrays.asList(e.toString().split(","));
}
return e.getValue();
}));
IntrospectionSupport.setProperties(searchCriteria, criteriaOptions);
config.setSearchCriteria(searchCriteria);
}
} catch (Exception e) {
throw new IllegalArgumentException(e.getMessage(), e);
}
// validate configuration
config.validate();
this.initServiceProvider();
}
代码示例来源:origin: org.apache.camel/camel-facebook
@Override
public void configureProperties(Map options) {
super.configureProperties(options);
// set configuration properties first
try {
if (cOnfiguration== null) {
cOnfiguration= new FacebookEndpointConfiguration();
}
EndpointHelper.setReferenceProperties(getCamelContext(), configuration, options);
EndpointHelper.setProperties(getCamelContext(), configuration, options);
} catch (Exception e) {
throw new IllegalArgumentException(e.getMessage(), e);
}
// extract reading properties
FacebookPropertiesHelper.configureReadingProperties(configuration, options);
// validate configuration
configuration.validate();
// validate and initialize state
initState();
}
代码示例来源:origin: org.apache.camel/camel-jmx
@Override
@SuppressWarnings("unchecked")
protected Endpoint createEndpoint(String uri, String remaining, Map parameters) throws Exception {
JMXEndpoint endpoint = new JMXEndpoint(uri, this);
// use the helper class to set all of the properties
EndpointHelper.setReferenceProperties(getCamelContext(), endpoint, parameters);
EndpointHelper.setProperties(getCamelContext(), endpoint, parameters);
endpoint.setServerURL(remaining);
Map objectProperties = IntrospectionSupport.extractProperties(parameters, "key.");
if (objectProperties != null && !objectProperties.isEmpty()) {
endpoint.setObjectProperties(objectProperties);
}
if (endpoint.getObjectDomain() == null) {
throw new IllegalArgumentException("Must specify domain");
}
if (endpoint.getObjectName() == null && endpoint.getObjectProperties() == null) {
throw new IllegalArgumentException("Must specify object name or object properties");
}
return endpoint;
}
代码示例来源:origin: org.apache.camel/camel-netty4
EndpointHelper.setReferenceProperties(component.getCamelContext(), this, parameters);
EndpointHelper.setProperties(component.getCamelContext(), this, parameters);
代码示例来源:origin: org.apache.camel/camel-netty
EndpointHelper.setReferenceProperties(component.getCamelContext(), this, parameters);
EndpointHelper.setProperties(component.getCamelContext(), this, parameters);