Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceTemplate


    protected ServiceTemplate getServiceTemplate()
                                               throws ClassNotFoundException
    {
        Class c = Class.forName
        ("com.sun.jini.test.spec.servicediscovery.AbstractBaseTest$TestService");
  return new ServiceTemplate(null, new Class[]{c}, null);
    }//end getServiceTemplate
View Full Code Here


    protected ServiceTemplate getServiceTemplate()
                                               throws ClassNotFoundException
    {
        Class c = Class.forName
            ("com.sun.jini.test.spec.joinmanager.AbstractBaseTest$TestService");
  return new ServiceTemplate(null, new Class[]{c}, null);
    }//end getServiceTemplate
View Full Code Here

            lookupTmpl[i] = null;
            /* Create template that matches on type and attribute */
      Class c = Class.forName(testServiceClassname);
      Entry[] attrs = new Entry[1];
      attrs[0] = new TestServiceIntAttr(val);
      lookupTmpl[i] = new ServiceTemplate(null,new Class[]{c},attrs);
            logger.log(Level.FINE, "looking up TestService."+val
                              +" -- blocking "+waitDur/1000+" second(s)");
        }//end loop(i)
        verifyServiceRegistration(expectedService,lookupTmpl,waitDur);
    }//end registerAndVerify
View Full Code Here

           ServiceItemFilter filter,
           ServiceDiscoveryListener listener,
           long leaseDuration)
                                                       throws RemoteException
    {
  if(tmpl == null) tmpl = new ServiceTemplate(null, null, null);
  LookupCacheImpl cache = new LookupCacheImpl(tmpl, filter,
                                                    listener, leaseDuration);
  synchronized(caches) {
      caches.add(cache);
  }
View Full Code Here

      int len =  tmpl.attributeSetTemplates.length;
      attributeSetTemplates = new Entry[len];
      System.arraycopy(tmpl.attributeSetTemplates, 0,
                             attributeSetTemplates, 0, len);
  }
  return new ServiceTemplate(tmpl.serviceID,
                                   serviceTypes,
                                   attributeSetTemplates);
    }//end copyServiceTemplate
View Full Code Here

    sClassType[1] = sc;
      }
      /* XXXX end */

      for (j=0;j<nAttrClasses;j++) {
    tmpl[i][j] = new ServiceTemplate(null,classType,
             tmplAttrs[j]);
    sTmpl[i][j] = new ServiceTemplate(null,sClassType,
              tmplAttrs[j]);
    proxy.notify(tmpl[i][j],
           transitionMask,
           listener,
           new MarshalledObject
View Full Code Here

         *  the service ID of one of the registered service items
         */
  srvcIDTmpl = new ServiceTemplate[srvcRegs.length];
        for (i=0;i<srvcRegs.length;i++) {
            curSrvcID = srvcRegs[i].getServiceID();
            srvcIDTmpl[i] = new ServiceTemplate(curSrvcID,null,null);
  }
        /* to each registered service item, add one of the attributes from the
         * first set of attributes
         */
  for(i=0; i<srvcRegs.length; i++) {
View Full Code Here

                    + configFileName + "\"", ex);
        }

        // This is the class of the service we are looking for...
        Class[] classes = new Class[] { DistributedActor.class };
        ServiceTemplate template = new ServiceTemplate(null, classes, null);

        try {
            cache = clientMgr.createLookupCache(template, null, // no filter
                    this); // no listener
        } catch (Exception e) {
View Full Code Here

        }

        // Creating service template to find transaction manager service by matching fields.
        Class<?>[] classes = new Class<?>[] {net.jini.core.transaction.server.TransactionManager.class};
        // Name sn = new Name("*");
        ServiceTemplate tmpl = new ServiceTemplate(null, classes, new Entry[] {});

        // Creating a lookup locator
        LookupLocator locator = new LookupLocator(uri);
        ServiceRegistrar sr = locator.getRegistrar();

View Full Code Here

            System.setSecurityManager(new RMISecurityManager());
        }

        Class<?>[] classes = new Class<?>[] {net.jini.space.JavaSpace.class};
        Name sn = new Name(spaceName);
        ServiceTemplate tmpl = new ServiceTemplate(null/* serviceID */, classes, new Entry[] {sn});

        LookupLocator locator = new LookupLocator(url); // <protocol>://<hostname>
        ServiceRegistrar sr = locator.getRegistrar();
        JavaSpace space = (JavaSpace) sr.lookup(tmpl);

View Full Code Here

TOP

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

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.