Build and construct the given services.

@param services a map of required services and their minimum version
@return list of services actually created
5566
private Map<ScopeService, Service> createServices(final Set<ScopeService> services) {
    Map<ScopeService, Service> actualServices = Maps.newTreeMap();

    for (ScopeService requiredService : services) {
      if (availableServices.containsKey(requiredService)) {
        for (ScopeService availableService : availableServices.keySet()) {
          if (availableService == requiredService) {
            actualServices.put(requiredService, requiredService.newInstance(this));
          }
        }
      }
    }

    return actualServices;
  }
955651
public List<ServiceRefType<MessageDrivenBeanType<T>>> getAllServiceRef()
   {
      List<ServiceRefType<MessageDrivenBeanType<T>>> list = new ArrayList<ServiceRefType<MessageDrivenBeanType<T>>>();
      List<Node> nodeList = childNode.get("service-ref");
      for(Node node: nodeList)
      {
         ServiceRefType<MessageDrivenBeanType<T>>  type = new ServiceRefTypeImpl<MessageDrivenBeanType<T>>(this, "service-ref", childNode, node);
         list.add(type);
      }
      return list;
   }
1243404
@Override
  @ExperimentalApi("https://github.com/grpc/grpc-java/issues/2222")
  public List<ServerServiceDefinition> getServices() {
    return Collections.unmodifiableList(new ArrayList<>(services.values()));
  }
589254
private String simpleServiceNames(Collection<Service> services) {
        StringBuilder buffer = new StringBuilder();
        for (Service service : services) {
            if (buffer.length() > 0) {
                buffer.append(",");
            }
            buffer.append(service.getClass().getSimpleName());
        }
        return buffer.toString();
    }
1044673
public HttpServerBuilder connectors(List<Connector> connectors) {
        endpoint.setConnectors(connectors.toArray(new Connector[connectors.size()]));
        return this;
    }
740157
public function buildServices($services)
    {
        $buildServices = [];
        if (!empty($services)) {
            foreach ($services as $service) {
                $class = get_class($this->container->get($service));
                $class = $this->getInterface($class);
                $shortClass = explode('\\', $class);
                $machineName = str_replace('.', '_', $service);
                $buildServices[$service] = [
                  'name' => $service,
                  'machine_name' => $machineName,
                  'camel_case_name' => $this->stringConverter->underscoreToCamelCase($machineName),
                  'class' => $class,
                  'short' => end($shortClass),
                ];
            }
        }

        return $buildServices;
    }
367059
public HttpFileService build() {
        return new HttpFileService(new HttpFileServiceConfig(
                vfs, clock, maxCacheEntries, maxCacheEntrySizeBytes,
                serveCompressedFiles, autoIndex, headers()));
    }
461633
def services(self):
        """"""
        services = []
        if self._services is None:
            self.__init()
        for service in self._services:
            url = "%s/%s/%s" % (self.root, service['name'], service['type'])
            if service['type'] == "GPServer":
                services.append(GPService(url=url,
                                          securityHandler=self._securityHandler,
                                          proxy_url=self._proxy_url,
                                          proxy_port=self._proxy_port))
            elif service['type'] == "MapServer":
                services.append(MapService(url=url,
                                           securityHandler=self._securityHandler,
                                           proxy_url=self._proxy_url,
                                           proxy_port=self._proxy_port))
            elif service['type'] == "ImageServer":
                services.append(ImageService(url=url,
                                             securityHandler=self._securityHandler,
                                             proxy_url=self._proxy_url,
                                             proxy_port=self._proxy_port))
            elif service['type'] == "FeatureServer":
                if self.currentFolder == 'root':
                    serviceName = service['name']
                else:
                    serviceName = service['name'].split('/')[1]
                url = "%s/%s/%s" % (self.location, serviceName, service['type'])
                services.append(FeatureService(url=url,
                                               securityHandler=self._securityHandler,
                                               proxy_url=self._proxy_url,
                                               proxy_port=self._proxy_port))
            elif service['type'] == "GeometryServer":
                url = "%s/%s/%s" % (self.root, service['name'], service['type'])
                services.append(GeometryService(url=url,
                                               securityHandler=self._securityHandler,
                                               proxy_url=self._proxy_url,
                                               proxy_port=self._proxy_port))
            elif service['type'] == "MobileServer":
                services.append(MobileService(url=url,
                                              securityHandler=self._securityHandler,
                                              proxy_url=self._proxy_url,
                                              proxy_port=self._proxy_port))
            elif service['type'] == "NAServer":
                services.append(NetworkService(url=url,
                                               securityHandler=self._securityHandler,
                                               proxy_port=self._proxy_port,
                                               proxy_url=self._proxy_url))
            elif service['type'] == "GeocodeServer":
                services.append(GeocodeService(url=url,
                                               securityHandler=self._securityHandler,
                                               proxy_port=self._proxy_port,
                                               proxy_url=self._proxy_url))
            elif service['type'] == "GeoDataServer":
                services.append(GeoDataService(url=url,
                                               securityHandler=self._securityHandler,
                                               proxy_port=self._proxy_port,
                                               proxy_url=self._proxy_url))
            elif service['type'] == "GlobeServer":
                services.append(GlobeService(url=url,
                                               securityHandler=self._securityHandler,
                                               proxy_port=self._proxy_port,
                                               proxy_url=self._proxy_url))
            elif service['type'] == "StreamServer":
                services.append(StreamService(url=url,
                                             securityHandler=self._securityHandler,
                                             proxy_port=self._proxy_port,
                                             proxy_url=self._proxy_url))                
            elif service['type'] in ("IndexGenerator", "IndexingLauncher", "SearchServer"):
                pass
            else:
                print (service['type'], service['name'])
        return services
759290
public void setServices(java.util.Collection<Service> services) {
        if (services == null) {
            this.services = null;
            return;
        }

        this.services = new java.util.ArrayList<Service>(services);
    }
814198
@Override
    public Publisher<List<String>> getServiceIds() {
        ServiceFilter serviceFilter = new ServiceFilter().withName("NAMESPACE_ID").withValues(getRoute53ClientDiscoveryConfiguration().getNamespaceId());
        ListServicesRequest listServicesRequest = new ListServicesRequest().withFilters(serviceFilter);
        Future<ListServicesResult> response = getDiscoveryClient().listServicesAsync(listServicesRequest);
        Flowable<ListServicesResult> flowableList = Flowable.fromFuture(response);
        return flowableList.flatMap(this::convertServiceIds);
    }
873904
@Override
    public Collection<Class<? extends LifecycleComponent>> getGuiceServiceClasses() {

        if (client || tribeNodeClient || disabled || sslOnly) {
            return Collections.emptyList();
        }

        final List<Class<? extends LifecycleComponent>> services = new ArrayList<>(1);
        services.add(GuiceHolder.class);
        return services;
    }
253651
public Catalog createCatalog() {
        final List<CatalogService> services = new ArrayList<>();

        for (BrokerServiceAccessor serviceAccessor : serviceAccessors) {
            services.add(serviceAccessor.getServiceDescription());
        }

        return new Catalog(services);
    }
175451
@Override
    public Set<URI> listServices() {
        String queryStr = new StringBuilder()
                .append("SELECT DISTINCT ?svc WHERE { \n")
                .append(" GRAPH ?g { \n")
                .append("?svc ").append("<").append(RDF.type.getURI()).append(">").append(" ").append("<").append(MSM.Service.getURI()).append("> . \n")
                .append(" } \n")
                .append("} \n")
                .toString();

        return this.graphStoreManager.listResourcesByQuery(queryStr, "svc");
    }
1294889
public GrpcServiceBuilder addServices(BindableService... bindableServices) {
        requireNonNull(bindableServices, "bindableServices");
        return addServices(ImmutableList.copyOf(bindableServices));
    }
916787
def get_missing_services(self, services):
        
        required_services = set(services)
        provided_services = set(self._services.keys())
        missing_services = required_services.difference(provided_services)

        return sorted(missing_services)
354202
def create_services(self, compose_str: str) -> list:
        
        # Raise an exception if we are not a manager
        if not self._manager:
            raise RuntimeError('Services can only be run on '
                               'swarm manager nodes')

        # Initialise empty list
        services_ids = []

        try:
            service_config = yaml.load(compose_str)

            # Deepcopy the service config
            service_list = copy.deepcopy(service_config)

            # Removing version and service from the dict
            service_config.pop('version')
            service_config.pop('services')

            for service_name in service_list['services']:
                service_exist = self._client.services.list(
                    filters={'name': service_name})
                if not service_exist:
                    service_config['name'] = service_name
                    service_spec = self._parse_services(
                        service_config, service_name, service_list)
                    created_service = self._client.services.create(
                        **service_spec)
                    service_id = created_service.short_id
                    LOG.debug('Service created: %s', service_id)
                    services_ids.append(service_id)
                else:
                    LOG.debug('Services already exists')

        except yaml.YAMLError as exc:
            print(exc)

        # Returning list of services created
        return services_ids
382406
private List<ModelService> getAllServicesForSync(){
        List<ModelService> allServices = new ArrayList<ModelService>();
        allServices.addAll(this.cache.values());

        List<ModelService> syncServices = new ArrayList<ModelService>();
        for(ModelService service : allServices){
            ModelService syncService = new ModelService(service.getName(), service.getId(), service.getCreateTime());
            Date modifiedTime = service.getModifiedTime();
            if (modifiedTime != null) {
                syncService.setModifiedTime(modifiedTime);
            }
            syncServices.add(syncService);
        }
        return syncServices;
    }