本文整理了Java中jadex.bridge.service.search.SServiceProvider.getSearchManager()
方法的一些代码示例,展示了SServiceProvider.getSearchManager()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SServiceProvider.getSearchManager()
方法的具体详情如下:
包路径:jadex.bridge.service.search.SServiceProvider
类名称:SServiceProvider
方法名:getSearchManager
[英]Get the fitting search manager.
[中]获取配件搜索管理器。
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
/**
* Get the fitting search manager.
* @param multiple The multiple flag (i.e. one vs. multiple services required)
*/
public static ISearchManager getSearchManager(boolean multiple)
{
return getSearchManager(multiple, null);
}
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
/**
* Get all declared services of the given provider.
* @return The corresponding services.
*/
public static IIntermediateFuture<IService> getDeclaredServices(IServiceProvider provider)
{
// synchronized(profiling)
// {
// Integer cnt = (Integer)profiling.get(type);
// profiling.put(type, Integer.valueOf(cnt!=null ? cnt.intValue()+1 : 1));
// }
final IntermediateFuture<IService> ret = new IntermediateFuture<IService>();
// Hack->remove
// IVisitDecider contdecider = new DefaultVisitDecider(false);
// if(Proxy.isProxyClass(provider.getClass()))
// System.out.println("herere");
provider.getServices(getSearchManager(false, RequiredServiceInfo.SCOPE_LOCAL), contdecider, contanyselector)
.addResultListener(new IntermediateDelegationResultListener<IService>(ret));
return ret;
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get all service proxies from a remote component.
* (called from arbitrary components)
* @param cid The remote provider id.
* @param service The service type.
* @param scope The search scope.
* @return The service proxy.
*/
public <T> IFuture<T> getServiceProxies(IComponentIdentifier cid, Class<T> service, String scope)
{
final Future<T> ret = new Future<T>();
getServiceProxies(cid, SServiceProvider.getSearchManager(true, scope),
SServiceProvider.getVisitDecider(false, scope), new TypeResultSelector(service, true))
.addResultListener(new ExceptionDelegationResultListener<Object, T>(ret)
{
public void customResultAvailable(Object result)
{
ret.setResult((T)result);
}
});
return ret;
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform
/**
* Get all service proxies from a remote component.
* (called from arbitrary components)
* @param cid The remote provider id.
* @param service The service type.
* @param scope The search scope.
* @return The service proxy.
*/
public <T> IFuture<T> getServiceProxies(IComponentIdentifier cid, Class<T> service, String scope)
{
final Future<T> ret = new Future<T>();
getServiceProxies(cid, SServiceProvider.getSearchManager(true, scope),
SServiceProvider.getVisitDecider(false, scope), new TypeResultSelector(service, true))
.addResultListener(new ExceptionDelegationResultListener<Collection<IService>, T>(ret)
{
public void customResultAvailable(Collection<IService> result)
{
ret.setResult((T)result);
}
});
return ret;
}
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
ITerminableIntermediateFuture fut = provider.getServices(getSearchManager(true, scope),
getVisitDecider(false, scope),
new TypeResultSelector(type, false, RequiredServiceInfo.SCOPE_GLOBAL.equals(scope), filter));
代码示例来源:origin: net.sourceforge.jadex/jadex-platform-base
/**
* Get a service proxy from a remote component.
* (called from arbitrary components)
* @param cid The remote provider id.
* @param service The service type.
* @param scope The search scope.
* @return The service proxy.
*/
public <T> IFuture<T> getServiceProxy(final IComponentIdentifier cid, final Class<T> service, String scope)
{
final Future<T> ret = new Future<T>();
getServiceProxies(cid, SServiceProvider.getSearchManager(false, scope), SServiceProvider.getVisitDecider(true, scope),
new TypeResultSelector(service, true)).addResultListener(new ExceptionDelegationResultListener<Object, T>(ret)
{
public void customResultAvailable(Object result)
{
if(result!=null && !((Collection<?>)result).isEmpty())
{
Object o = ((Collection<?>)result).iterator().next();
ret.setResult((T)o);
}
else
{
super.exceptionOccurred(new ServiceNotFoundException("No proxy for service found: "+cid+", "+service.getName()));
}
}
});
return ret;
}
代码示例来源:origin: net.sourceforge.jadex/jadex-platform
getServiceProxies(cid, SServiceProvider.getSearchManager(false, scope), SServiceProvider.getVisitDecider(true, scope),
new TypeResultSelector(service, true)).addResultListener(new ExceptionDelegationResultListener<Collection<IService>, T>(ret)
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
provider.getServices(getSearchManager(false, RequiredServiceInfo.SCOPE_PLATFORM),
getVisitDecider(true, RequiredServiceInfo.SCOPE_PLATFORM), selector)
.addResultListener(new DelegationResultListener(ret)
代码示例来源:origin: net.sourceforge.jadex/jadex-bridge
provider.getServices(getSearchManager(false, scope), getVisitDecider(true, scope),
new TypeResultSelector(type, true, RequiredServiceInfo.SCOPE_GLOBAL.equals(scope), filter))
.addResultListener(new IIntermediateResultListener<IService>()
内容来源于网络,如有侵权,请联系作者删除!