Examples of ServiceItem


Examples of net.jini.core.lookup.ServiceItem

             * lookup service(s) for the one registered service that both
             * matches the template and satisfies the filter
             */
            logger.log(Level.FINE, "  performing lookup -- "
                      +"srvcItem = srvcDiscoveryMgr.lookup(template,filter)");
            ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                           firstStageFilter);

            if(expectedService == null) {
                if(srvcItem != null) {
                    throw new TestException(" -- filter failed -- unexpected "
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

     */
    protected void applyTestDef() throws Exception {
        /* Through the service discovery manager, query the discovered lookup
         * service(s) for the desired services
         */
        ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                       firstStageFilter);
        if(srvcItem == null) {
            throw new TestException(" -- service returned is null");
        } else if(srvcItem.service == null) {
            throw new TestException(" -- service component of "
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

            logger.log(Level.FINE, "looking up non-existant "
                             +"service -- blocking "+waitDurSecs+" second(s)");
        }//endif(nSrvcs>0)
        /* Try to lookup the service, block until the service appears */
            long startTime = System.currentTimeMillis();
            ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                           firstStageFilter,
                                                           waitDur);
            long endTime = System.currentTimeMillis();
            long actualBlockTime = endTime-startTime;
            long waitError = (actualBlockTime-waitDur)/1000;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

        /* Through the service discovery manager, query the discovered lookup
         * service(s) for the desired registered service(s), and verify
         * that the desired service is returned immediately (does not block).
         */
  long startTime = System.currentTimeMillis();
  ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                   firstStageFilter,
                   waitDur);
  long endTime = System.currentTimeMillis();
  long actualBlockTime = endTime-startTime;
  long waitError = (actualBlockTime-waitDur)/1000;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

                    throw new RuntimeException(e.toString());
                }
                logger.log(Level.FINE, "registering test service "
                                              +i+" with lookup service "+loc);
                ServiceRegistration srvcReg =
                 lookupProxy.register(new ServiceItem(srvcID,testService,null),
                                      Long.MAX_VALUE);
    Lease srvcLease = null;
    try {
        srvcReg = (ServiceRegistration) getConfig().prepare(
           "test.reggieServiceRegistrationPreparer",
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

        public SrvcListener(QAConfig util, String classname) {
            this.util = util;
            this.classname = classname;
        }//end constructor
  public void serviceAdded(ServiceDiscoveryEvent event) {
            ServiceItem srvcItem = event.getPostEventServiceItem();
            ServiceID srvcID = srvcItem.serviceID;
            logger.log(Level.FINE, ""+nAdded+" -- serviceAdded()-"
                              +srvcItem.service+"-"+srvcID);
            synchronized(lock) {
                nAdded++;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

            synchronized(lock) {
                nAdded++;
            }
  }//end serviceAdded
  public void serviceRemoved(ServiceDiscoveryEvent event) {
            ServiceItem srvcItem = event.getPreEventServiceItem();
            ServiceID srvcID = srvcItem.serviceID;
            logger.log(Level.FINE, ""+nRemoved+" -- serviceRemoved()-"
                              +srvcItem.service+"-"+srvcID);
            synchronized(lock) {
                nRemoved++;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

            synchronized(lock) {
                nRemoved++;
            }
  }//end serviceRemoved
  public void serviceChanged(ServiceDiscoveryEvent event) {
            ServiceItem srvcItem = event.getPreEventServiceItem();
            ServiceID srvcID = srvcItem.serviceID;
            logger.log(Level.FINE, ""+nChanged+" -- serviceChanged()-"
                              +srvcItem.service+"-"+srvcID);
            synchronized(lock) {
                nChanged++;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

   *   -- verify the expected service was returned by the lookup
   */
  for(int i=0;i<expectedService.length;i++) {
      /* Try to lookup the service, block until the service appears */
      long startTime = System.currentTimeMillis();
      ServiceItem srvcItem = srvcDiscoveryMgr.lookup(lookupTmpl[i],
                 null,//filter
                 waitDur);
      long endTime = System.currentTimeMillis();
      long actualBlockTime = endTime-startTime;
      long waitError = (actualBlockTime-waitDur)/1000;
View Full Code Here

Examples of net.jini.core.lookup.ServiceItem

        }
        /* lookup(tmpl,filter) */
        methodStr = new String("lookup(tmpl,filter)");
        logger.log(Level.FINE, "invoking "+methodStr+" ...");
        try {
            ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                           firstStageFilter);
            logger.log(Level.FINE, ""+errStr+methodStr);
            failed = true;
        } catch(IllegalStateException e) {
            logger.log(Level.FINE, successStr+methodStr);
        }
        /* lookup(tmpl,filter,waitDur) */
        methodStr = new String("lookup(tmpl,filter,waitDur)");
        logger.log(Level.FINE, "invoking "+methodStr+" ...");
        try {
            ServiceItem srvcItem = srvcDiscoveryMgr.lookup(template,
                                                           firstStageFilter,
                                                           1000);
            logger.log(Level.FINE, errStr+methodStr);
            failed = true;
        } catch(IllegalStateException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.