protected Entry[] getEntryArray() { try{ ServiceMatches matches = registrar.lookup(new ServiceTemplate(item.serviceID, new Class[] { item.service.getClass() }, new Entry[] {}), 10); if(matches.totalMatches != 1) Browser.logger.log(Level.INFO, "unexpected lookup matches: {0}", new Integer(matches.totalMatches)); else return matches.items[0].attributeSets; } catch (Throwable t) { Browser.logger.log(Level.INFO, "lookup failed", t); } return null; } }
protected Entry[] getEntryArray() { if(admin instanceof JoinAdmin) { try { item.attributeSets = ((JoinAdmin) admin).getLookupAttributes(); } catch (Throwable t) { logger.log(Level.INFO, "obtaining attributes failed", t); } } else { try{ ServiceMatches matches = registrar.lookup(stmpl, 1); if(matches.totalMatches != 1) Browser.logger.log(Level.INFO, "unexpected lookup matches: {0}", new Integer(matches.totalMatches)); else item.attributeSets = matches.items[0].attributeSets; } catch (Throwable t) { Browser.logger.log(Level.INFO, "lookup failed", t); } } return item.attributeSets; }
/** * Find the service and notify once it is found. * * @param templ * @param lus */ private void findService(ServiceTemplate templ, ServiceRegistrar lus) { try { synchronized (this) { proxy = lus.lookup(templ); //System.out.println(lus.lookup(new ServiceTemplate(null, // new Class[] { TransactionManager.class }, null))); if (proxy != null) { if (log.isDebugEnabled()) log.debug("Discovered proxy " + proxy.getClass()); this.notify(); } else { if (log.isDebugEnabled()) log.debug("template " + templ + " not found in registrar " + lus); } } } catch (RemoteException re) { throw new RemoteAccessException("can not find service", re); } }
matches = proxy.lookup(tmpl, Integer.MAX_VALUE); } catch (Exception e) { boolean cacheTerminated;
ServiceMatches sm = proxy.lookup(tmpl, max); int nItems = sm.items.length; if (nItems == 0) continue;//no matches, query next lookup
try { int maxMatches = ((filter != null) ? Integer.MAX_VALUE : 1); ServiceMatches sm = proxy.lookup(tmpl, maxMatches); sItem = getMatchedServiceItem(sm, filter); } catch (InterruptedSpaceException e) {
matches = lookup.lookup(tmpl, (match || isAdmin) ? 1000 : 0); } catch (Throwable t) { logger.log(Level.INFO, "lookup failed", t);
ServiceMatches matches = proxy.lookup(tmpl, Integer.MAX_VALUE); items = matches.items; } else {
ServiceMatches matches = proxy.lookup(tmpl, max); result = matches.items; } else {
Object [] matches; if (useInsecureLookup()){ ServiceMatches sm = proxy.lookup(tmpl, maxMatches); matches = sm.items; } else {