本文整理了Java中org.apache.camel.spi.Registry.lookup
方法的一些代码示例,展示了Registry.lookup
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.lookup
方法的具体详情如下:
包路径:org.apache.camel.spi.Registry
类名称:Registry
方法名:lookup
暂无
代码示例来源:origin: net.sf.jabb/jabb-core
/**
* Looks up from all encapsulated Registry(s) one by one, and returns the first result found.<br>
* 按次序从所封装的Registry中查找,返回第一个找到的结果。
* <p>
* If no result can be found, null will be returned.
* <p>
* 如果全都找不到,则返回null。
*
* @see org.apache.camel.spi.Registry#lookup(java.lang.String)
*/
public Object lookup(String name) {
Object result = null;
for (Registry reg: registryList){
result = reg.lookup(name);
if (result != null){
break;
}
}
return result;
}
代码示例来源:origin: net.sf.jabb/jabb-core
/**
* Looks up from all encapsulated Registry(s) one by one, and returns the first result found.<br>
* 按次序从所封装的Registry中查找,返回第一个找到的结果。
* <p>
* If no result can be found, null will be returned.
* <p>
* 如果全都找不到,则返回null。
*
* @see org.apache.camel.spi.Registry#lookup(java.lang.String, java.lang.Class)
*/
public <T> T lookup(String name, Class<T> type) {
T result = null;
for (Registry reg: registryList){
result = reg.lookup(name, type);
if (result != null){
break;
}
}
return result;
}
代码示例来源:origin: OpenWiseSolutions/openhub-framework
@Override
public Object lookup(String name) {
for (Registry registry : applicationContextsRegistry.values()) {
Object result = registry.lookup(name);
if (result != null) {
return result;
}
}
return null;
}
代码示例来源:origin: OpenWiseSolutions/openhub-framework
@Override
public <T> T lookup(String name, Class<T> type) {
for (Registry registry : applicationContextsRegistry.values()) {
T result = registry.lookup(name, type);
if (result != null) {
return result;
}
}
return null;
}
代码示例来源:origin: jboss-switchyard/components
private boolean isRegisteredInCamelRegistry(String beanName) {
return _context.getRegistry().lookup(beanName) != null;
}
代码示例来源:origin: org.switchyard.components/switchyard-component-common-camel
private boolean isRegisteredInCamelRegistry(String beanName) {
return _context.getRegistry().lookup(beanName) != null;
}
代码示例来源:origin: com.googlecode.metridoc/metridoc-camel-core
DataSource getDataSource(Map<String, Object> parameters) {
String dataSourceReference = (String) parameters.remove("dataSource");
Assert.notEmpty(dataSourceReference, "the dataSource parameter must be provided when using the "
+ "liquibase component");
return getCamelContext().getRegistry().lookup(dataSourceReference, DataSource.class);
}
代码示例来源:origin: com.googlecode.metridoc/metridoc-camel-core
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception {
String dataSourceKey = getAndRemoveParameter(parameters, "dataSource", String.class);
Assert.notNull(dataSourceKey, "the variable 'dataSource' must be set on the sqlplus endpoint");
DataSource dataSource = getCamelContext().getRegistry().lookup(dataSourceKey, DataSource.class);
remaining = remaining.trim();
if (remaining.endsWith(".sql")) {
return createFileEndpoint(uri, remaining, parameters, dataSource);
} else {
return createSqlPlusEndpoint(uri, remaining, parameters, dataSource);
}
}
代码示例来源:origin: org.apache.servicemix/servicemix-camel
filter = filter.substring(1);
Object object = registry.lookup(filter);
if (object instanceof HeaderFilterStrategy) {
headerFilterStrategy = (HeaderFilterStrategy)object;
代码示例来源:origin: org.fusesource.eca/eca-core
protected Endpoint resolveEndpoint(String targetId) {
Endpoint result = getContext().getRegistry().lookup(targetId, Endpoint.class);
if (result == null) {
result = CamelContextHelper.getMandatoryEndpoint(getContext(), targetId);
}
return result;
}
代码示例来源:origin: org.drools/drools-camel
node = component.getCamelContext().getRegistry().lookup( nodeId,
GridNode.class );
if ( node == null ) {
executor = component.getCamelContext().getRegistry().lookup( ksessionId,
CommandExecutor.class );
if ( executor == null ) {
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools
node = component.getCamelContext().getRegistry().lookup( nodeId,
GridNode.class );
if ( node == null ) {
executor = component.getCamelContext().getRegistry().lookup( ksessionId,
CommandExecutor.class );
if ( executor == null ) {
内容来源于网络,如有侵权,请联系作者删除!