jadex.bridge.service.search.SServiceProvider.getVisitDecider()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.0k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中jadex.bridge.service.search.SServiceProvider.getVisitDecider()方法的一些代码示例,展示了SServiceProvider.getVisitDecider()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SServiceProvider.getVisitDecider()方法的具体详情如下:
包路径:jadex.bridge.service.search.SServiceProvider
类名称:SServiceProvider
方法名:getVisitDecider

SServiceProvider.getVisitDecider介绍

[英]Get the fitting visit decider.
[中]找到合适的拜访决策者。

代码示例

代码示例来源:origin: net.sourceforge.jadex/jadex-bridge

/**
 *  Get the fitting visit decider.
 */
public static IVisitDecider getVisitDecider(boolean abort)
{
  return getVisitDecider(abort, null);
}

代码示例来源:origin: net.sourceforge.jadex/jadex-bridge

getVisitDecider(false, scope),
  new TypeResultSelector(type, false, RequiredServiceInfo.SCOPE_GLOBAL.equals(scope), filter));
fut.addResultListener(new TerminableIntermediateDelegationResultListener(ret, fut));

代码示例来源: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-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-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-bridge

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>()

相关文章