Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceMatches


  _registrars.remove(reg.getServiceID());
    }
   
    private synchronized void findServices(ServiceRegistrar reg) {
  try {
      ServiceMatches matches = reg.lookup(_serviceTemplate,
            Integer.MAX_VALUE);
      System.out.println(matches.totalMatches + " services found " + reg);
      if (matches.totalMatches == 0)
    matches = reg.lookup(_serviceTemplate, Integer.MAX_VALUE);
 
View Full Code Here


    _registrars.remove(reg.getServiceID());
  }
   
  private synchronized void findServices(ServiceRegistrar reg) {
    try {
      ServiceMatches matches = reg.lookup(_serviceTemplate, Integer.MAX_VALUE);
      System.out.println(matches.totalMatches + " services found " + reg);
      if (matches.totalMatches == 0)
  matches = reg.lookup(_serviceTemplate, Integer.MAX_VALUE);
 
      for (int i = 0; i < matches.totalMatches; i++) {
View Full Code Here

    buf.append(n);
    buf.append(" registrars, none selected");
      }
      return;
  }
  ServiceMatches matches;
  try {
      matches = lookup.lookup(tmpl, (match || isAdmin) ? 1000 : 0);
  } catch (Throwable t) {
      logger.log(Level.INFO, "lookup failed", t);
      return;
View Full Code Here

  this.totalMatches = totalMatches;
    }

    /** Converts a Matches to a ServiceMatches. */
    ServiceMatches get() throws RemoteException {
  return new ServiceMatches(Item.toServiceItem(items), totalMatches);
    }
View Full Code Here

     *        of objects returned equals the expected set of corresponding
     *        service items.
     */
    public void run() throws Exception {
  logger.log(Level.FINE, "in run() method.");
  ServiceMatches intfcM = null;

  for (int i=0; i<nClasses; i++) {
      for (int j=0; j<super.INTERFACES.length;j++) {
    if (super.INTFC_IMPL_MATRIX[i][j] == 0continue;
                    intfcM = proxy.lookup(intfcClassTmpls[i][j],
View Full Code Here

     *      found equals the number of matches expected; and that the set
     *      of objects returned equals the expected set of corresponding
     *      service items.
     */
    public void run() throws Exception {
  ServiceMatches exactM = null;
  for (int i=0; i<nClasses; i++) {
      exactM = proxy.lookup(exactClassTmpls[i],Integer.MAX_VALUE);
      if (exactM.totalMatches != expectedNMatchesExact[i]) {
    throw new TestException
        ("totalMatches ("+exactM.totalMatches+
View Full Code Here

      tmpl.serviceID = evnt.getServiceID();
      ServiceRegistrar proxy = (ServiceRegistrar)evnt.getSource();
      proxy = (ServiceRegistrar)
        QAConfig.getConfig().prepare("test.reggiePreparer",
                  proxy);
      ServiceMatches matches;
      matches = proxy.lookup(tmpl, 1);
      if (item == null) {
    if (matches.items.length != 0)
        throw new TestException(
            "verifyEventItems: event item is null, lookup returns non-null");
View Full Code Here

    public static void doLookup(ServiceItem[] srvcItems,
                                ServiceTemplate[] templates,
        ServiceRegistrar proxythrows Exception
    {
        Object serviceObj = null;
        ServiceMatches matches = null;
        for (int i=0; i<templates.length; i++) {
      serviceObj = proxy.lookup(templates[i]);
            if (!srvcItems[i].service.equals(serviceObj)) {
                throw new TestException("srvcItems["+i+
          "] != serviceObj returned by lookup()");
View Full Code Here

     *        service items.
     *  @exception QATestException usually indicates test failure
     */
    public void run() throws Exception {
  logger.log(Level.FINE, "in run() method.");
  ServiceMatches superM = null;

  for (int i=0; i<nClasses; i++) {
      /** Loop from j = 1 because the chain starts with the class
       *  itself; and this test is testing only its super classes
       */
 
View Full Code Here

  reg.modifyAttributes(new Entry[]{tmpl0, tmpl1,
           tmpl2, tmpl3},
           new Entry[]{mod0, mod1,
           mod2, mod3});
  ServiceTemplate t = new ServiceTemplate(reg.getServiceID(), null, null);
  ServiceMatches matches = getProxy().lookup(t, 1);
  if (matches.items.length != 1)
      throw new TestException("wrong number of matches from lookup");
  Entry[] newAttrs = matches.items[0].attributeSets;
  java.util.List list = java.util.Arrays.asList(newAttrs);
  for (int i = 0; i < attrs.length; i++) {
View Full Code Here

TOP

Related Classes of net.jini.core.lookup.ServiceMatches

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.