Package net.jini.core.lookup

Examples of net.jini.core.lookup.ServiceTemplate


    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


  for(i=0; i<srvcLeases.length; i++) {
      srvcLeases[i] = getRegistrationLease(srvcRegs[i]);
  }
  for(i=0; i<srvcIDTmpls.length; i++) {
      srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(),
                                                 null,null);
  }
   evntRegs = new EventRegistration[nInstances];
  evntLeases = new Lease[nInstances];
  registerAllEvents();
View Full Code Here

*/
public class NotifyNullListener extends QATestRegistrar {

    public void run() throws Exception {
  try {
      getProxy().notify(new ServiceTemplate(null, null, null),
            ServiceRegistrar.TRANSITION_MATCH_MATCH,
            null, null, Long.MAX_VALUE);
      throw new TestException("notify did not throw NullPointerException");
  } catch (NullPointerException e) {
  }
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

  srvcRegs = super.registerAll();
  proxy = super.getProxy();
        srvcIDTmpl = new ServiceTemplate[srvcRegs.length];
        for (i=0;i<srvcRegs.length;i++) {
            curSrvcID = srvcRegs[i].getServiceID();
            srvcIDTmpl[i] = new ServiceTemplate(curSrvcID,null,null);
  }
        for(i=0; i<srvcRegs.length; i++) {
      /* Not necessary to add each attribute to each service
             * instance; just pick a different attribute set from
             * attrs[][] for each service class instance
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);
View Full Code Here

  srvcRegs = super.registerAll(leaseDuration);
  proxy = super.getProxy();

  srvcIDTmpls = new ServiceTemplate[nInstances];
  for(int i=0; i<srvcIDTmpls.length; i++) {
      srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(),
                                                 null,null);
  }
  leaseStartTime = QATestUtils.getCurTime();
    }
View Full Code Here

           tmpl2, tmpl3,
           tmpl4, tmpl5},
           new Entry[]{mod0, mod1,
           mod2, mod3,
           mod4, mod5});
  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);
View Full Code Here

  srvcItems = super.createServiceItems(TEST_SRVC_CLASSES);
  srvcRegs = registerAll();
  proxy = super.getProxy();
  srvcIDTmpls = new ServiceTemplate[nInstances];
  for(int i=0; i<srvcIDTmpls.length; i++) {
      srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(),
                                                 null,null);
  }
  reuseServiceID();
  evntRegs = new EventRegistration[nInstances];
  evntLeases = new Lease[nInstances];
View Full Code Here

  srvcRegs = super.registerAll();
  proxy = super.getProxy();

  srvcIDTmpls = new ServiceTemplate[nInstances];
  for(int i=0; i<srvcIDTmpls.length; i++) {
      srvcIDTmpls[i] = new ServiceTemplate(srvcRegs[i].getServiceID(),
                                                 null,null);
  }
    }
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.