Configures the services that should be served by the server.

@param builder The server builder to configure.
342682
protected void configureServices(final T builder) {
        // support health check
        if (this.properties.isHealthServiceEnabled()) {
            builder.addService(this.healthStatusManager.getHealthService());
        }
        if (this.properties.isReflectionServiceEnabled()) {
            builder.addService(ProtoReflectionService.newInstance());
        }

        for (final GrpcServiceDefinition service : this.serviceList) {
            final String serviceName = service.getDefinition().getServiceDescriptor().getName();
            log.info("Registered gRPC service: " + serviceName + ", bean: " + service.getBeanName() + ", class: "
                    + service.getBeanClazz().getName());
            builder.addService(service.getDefinition());
            this.healthStatusManager.setStatus(serviceName, HealthCheckResponse.ServingStatus.SERVING);
        }
    }
816360
public static void configureHttpServices(
            ServerBuilder server, List<HttpServiceRegistrationBean> beans,
            @Nullable MeterIdPrefixFunctionFactory meterIdPrefixFunctionFactory) {
        requireNonNull(server, "server");
        requireNonNull(beans, "beans");

        beans.forEach(bean -> {
            Service<HttpRequest, HttpResponse> service = bean.getService();
            for (Function<Service<HttpRequest, HttpResponse>, ? extends Service<HttpRequest, HttpResponse>>
                    decorator : bean.getDecorators()) {
                service = service.decorate(decorator);
            }
            service = setupMetricCollectingService(service, bean, meterIdPrefixFunctionFactory);
            server.service(bean.getPathMapping(), service);
        });
    }
198440
public static void setServiceUser(String user) {
        if (serviceUser == null) {
            if (StringHelper.isEmpty(user))
                serviceUser = "N/A";
            else
                serviceUser = user;
        }
    }
93819
protected void configureLimits(final T builder, final String name) {
        final GrpcChannelProperties properties = getPropertiesFor(name);
        final Integer maxInboundMessageSize = properties.getMaxInboundMessageSize();
        if (maxInboundMessageSize != null) {
            builder.maxInboundMessageSize(maxInboundMessageSize);
        }
    }
173978
public void setServices(List<ServiceInfo> services) {
        if (services == null || services.size() == 0) {
            throw new IllegalArgumentException("services is empty!");
        }
        this.services = services;
        serviceReset = true;
    }
720339
public void setServiceConfigurations(java.util.Collection<ServiceConfiguration> serviceConfigurations) {
        if (serviceConfigurations == null) {
            this.serviceConfigurations = null;
            return;
        }

        this.serviceConfigurations = new com.amazonaws.internal.SdkInternalList<ServiceConfiguration>(serviceConfigurations);
    }
47823
public CacheConfigurationBuilder<K, V> clearAllServiceConfig() {
    CacheConfigurationBuilder<K, V> otherBuilder = new CacheConfigurationBuilder<>(this);
    otherBuilder.serviceConfigurations.clear();
    return otherBuilder;
  }
353829
public void registerOnRequest(Message.Builder builder) {
    requestMap.put(builder.getDescriptorForType().getFullName(), builder);
  }
1127468
@Override
    public void setService(final String name, final FrameworkSupportService service){
        synchronized (services){
            if(null==services.get(name) && null!=service) {
                services.put(name, service);
            }else if(null==service) {
                services.remove(name);
            }
        }
    }
291033
public function extend(Builder $builder): void
    {
        foreach ($this->extensions as $extension) {
            $this->{"add{$extension}"}($builder);
        }
    }
1135269
public void setQueryParamsBuilds(QueryParamsBuilder queryParamsBuilder) {
		PreconditionUtil.assertNotNull("A query params builder must be provided, but is null", queryParamsBuilder);
		this.queryParamsBuilder = queryParamsBuilder;
		this.querySpecDeserializer = null;
	}
443024
public function configureServiceManager(ServiceManager $serviceManager)
    {
        foreach ($this->config as $key => $value) {
            switch ($key) {
                case 'factories':
                    $this->configureFactories($serviceManager, $value);
                    break;
            }
        }
    }
803749
@PostConstruct
    public void configure() {
        if (identityProvider.isUnsatisfied()) {
            setIdentityProvider(new EJBContextIdentityProvider(context));
        } else {
            setIdentityProvider(identityProvider.get());
        }
        if (!userGroupCallback.isUnsatisfied()) {
            setUserGroupCallback(userGroupCallback.get());
        }
        super.init();
    }
524830
public static void put(String key, WidgetBuilder builder) {
		if (null != key && null != builder) {
			WIDGETBUILDERS.put(key, builder);
		}
	}
163802
public static GsonBuilder registerInstant(GsonBuilder builder)
  {
    if (builder == null) { throw new NullPointerException("builder cannot be null"); }

    builder.registerTypeAdapter(INSTANT_TYPE, new InstantConverter());

    return builder;
  }
486749
public void resolveBuilderGen() {
        if (getBean().isMutable()) {
            if (!getBean().isBuilderScopeVisible() && !getBean().isBeanStyleLightOrMinimal()) {
                return;  // no builder
            }
        }
        if (isDerived()) {
            builderGen = BuilderGen.NoBuilderGen.INSTANCE;
        } else {
            BuilderGen builder = config.getBuilderGenerators().get(getFieldTypeRaw());
            if (builder != null) {
                builderGen = builder;
            } else {
                builderGen = new BuilderGen.SimpleBuilderGen();
            }
        }
    }
361559
public static void configurePorts(ServerBuilder server, List<Port> ports) {
        requireNonNull(server, "server");
        requireNonNull(ports, "ports");
        ports.forEach(p -> {
            final String ip = p.getIp();
            final String iface = p.getIface();
            final int port = p.getPort();
            final List<SessionProtocol> protocols = p.getProtocols();

            if (ip == null) {
                if (iface == null) {
                    server.port(new ServerPort(port, protocols));
                } else {
                    try {
                        final Enumeration<InetAddress> e = NetworkInterface.getByName(iface).getInetAddresses();
                        while (e.hasMoreElements()) {
                            server.port(new ServerPort(new InetSocketAddress(e.nextElement(), port),
                                                       protocols));
                        }
                    } catch (SocketException e) {
                        throw new IllegalStateException("Failed to find an iface: " + iface, e);
                    }
                }
            } else if (iface == null) {
                if (NetUtil.isValidIpV4Address(ip) || NetUtil.isValidIpV6Address(ip)) {
                    final byte[] bytes = NetUtil.createByteArrayFromIpAddressString(ip);
                    try {
                        server.port(new ServerPort(new InetSocketAddress(
                                InetAddress.getByAddress(bytes), port), protocols));
                    } catch (UnknownHostException e) {
                        // Should never happen.
                        throw new Error(e);
                    }
                } else {
                    throw new IllegalStateException("invalid IP address: " + ip);
                }
            } else {
                throw new IllegalStateException("A port cannot have both IP and iface: " + p);
            }
        });
    }