Package eu.planets_project.ifr.core.servreg.api

Examples of eu.planets_project.ifr.core.servreg.api.ServiceRegistry.query()


                        "Sanselan", Migrate.class.getName())
                        .endpoint(endpoint2).paths(path).build());
        /* And can then query by example, e.g. for migration services supporting the path: */
        ServiceDescription example = new ServiceDescription.Builder(null, Migrate.class
                .getName()).paths(path).build();
        List<ServiceDescription> migrationServices = registry.query(example);
        /* Which we expect to return only the compatible migration service: */
        Assert.assertEquals(1, migrationServices.size());
        Assert.assertEquals("Sanselan", migrationServices.get(0).getName());
        /* For further example on queries see CoreRegistryTests */
    }
View Full Code Here


      // get the selected endpoint
      log.info("Getting Row data");
        _currentEndpoint = (PlanetsServiceEndpoint) this._endpointsDataTable.getRowData();
      ServiceRegistry registry = ServiceRegistryFactory.getServiceRegistry();
      ServiceDescription example = new ServiceDescription.Builder(null, null).endpoint(_currentEndpoint.getLocation()).build();
      List<ServiceDescription> _matches = registry.query(example)
        // If it's registered then get the description from the registry
      if (_matches.size() > 0) {
          descBean.setServiceDescription(_matches.get(0));
        // If it's a new style endpoint then we can get the description and set the bean
        } else if (! _currentEndpoint.isDeprecated()) {
View Full Code Here

        }*/
       
        //Look up all available Service(Descriptions) from the local service registry
        ServiceRegistry serReg = ServiceRegistryFactory.getServiceRegistry();
        //a null ServiceDescription will query all endpoints from the registry
        List<ServiceDescription> lServiceDescriptions = serReg.query(null);
        for(ServiceDescription serDesc : lServiceDescriptions){
          Service s = new Service(serDesc);
          if(s != null) sl.add(s);
        }
       
View Full Code Here

        ServiceRecordImpl sr = null;
       
        ServiceRegistry registry = instanciateServiceRegistry();
        ServiceDescription sdQuery = new ServiceDescription.Builder(null, null).endpoint(endpoint).build();
       
        List<ServiceDescription> result = registry.query(sdQuery);
        log.info("Got matching results: "+result);
       
        if( result != null && result.size() > 0 ) {
            ServiceDescription sd = result.get(0);
            sr = ServiceRecordImpl.createServiceRecordFromDescription(eid, sd, date);
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.