/** * Search for services. */ // read public <T> Collection<T> searchServices(ClassInfo type, IComponentIdentifier cid, String scope) { Set<T> ret = null; Iterator<IService> sers = getServices(type); if(sers!=null && sers.hasNext() && !RequiredServiceInfo.SCOPE_NONE.equals(scope)) { ret = new HashSet<T>(); while(sers.hasNext()) { IService ser = sers.next(); if(checkSearchScope(cid, ser, scope, false) && checkPublicationScope(cid, ser)) { ret.add((T)ser); } } } return ret; }
/** * Search for services. */ // read public <T> T searchService(ClassInfo type, IComponentIdentifier cid, String scope, boolean excluded) { // if(type!=null && type.getName().indexOf("IRegistrySer")!=-1) // System.out.println("search: "+type+" - "+cid); T ret = null; Iterator<IService> sers = getServices(type); if(sers!=null && sers.hasNext() && !RequiredServiceInfo.SCOPE_NONE.equals(scope)) { while(sers.hasNext()) { IService ser = sers.next(); if(checkSearchScope(cid, ser, scope, excluded) && checkPublicationScope(cid, ser)) { // if(ret!=null) // System.out.println("found another: "+ser.getServiceIdentifier()); ret = (T)ser; break; } } } return ret; }
Iterator<T> sers = (Iterator<T>)getServices(type); if(sers!=null && sers.hasNext() && !RequiredServiceInfo.SCOPE_NONE.equals(scope))
Iterator<T> sers = (Iterator<T>)getServices(type); if(sers!=null && sers.hasNext() && !RequiredServiceInfo.SCOPE_NONE.equals(scope))
/** * Search for services. */ // read public <T> ISubscriptionIntermediateFuture<T> searchServices(ClassInfo type, IComponentIdentifier cid, String scope, IAsyncFilter<T> filter) { final SubscriptionIntermediateFuture<T> ret = new SubscriptionIntermediateFuture<T>(); Iterator<T> sers = (Iterator<T>)getServices(type); if(sers!=null && sers.hasNext() && !RequiredServiceInfo.SCOPE_NONE.equals(scope)) { Collection<T> ssers = checkScope(sers, cid, scope, false); checkAsyncFilters(filter, ssers.iterator()).addResultListener(new IntermediateDelegationResultListener<T>(ret)); // filter checks in loop are possibly performed outside of synchornized block // searchLoopServices(filter, sers, cid, scope).addResultListener(new IntermediateDelegationResultListener<T>(ret)); } else { ret.setFinished(); } return ret; }
Iterator<T> sers = (Iterator<T>)getServices(type); if(sers!=null && sers.hasNext() && !RequiredServiceInfo.SCOPE_NONE.equals(scope))