Returns a newly created {@link HttpHealthCheckedEndpointGroup} based on the contents of the
{@link HttpHealthCheckedEndpointGroupBuilder}.
183769
public HttpHealthCheckedEndpointGroup build() {
        return new HttpHealthCheckedEndpointGroup(clientFactory, delegate, protocol, healthCheckPath,
                                                  healthCheckPort, retryInterval, configurator);
    }
1058563
public CreateClusterRequest withInstanceGroup(InstanceGroupConfig instanceGroup) {
        if (this.instanceGroups == null) {
            this.instanceGroups = new ArrayList<InstanceGroupConfig>();
        }
        this.instanceGroups.add(instanceGroup);
        return this;
    }
862277
@Override
    public java.util.concurrent.Future<GetHealthCheckCountResult> getHealthCheckCountAsync(
            com.amazonaws.handlers.AsyncHandler<GetHealthCheckCountRequest, GetHealthCheckCountResult> asyncHandler) {

        return getHealthCheckCountAsync(new GetHealthCheckCountRequest(), asyncHandler);
    }
898579
protected AggregatedHttpMessage newUnhealthyResponse(
            @SuppressWarnings("UnusedParameters") ServiceRequestContext ctx) {

        return AggregatedHttpMessage.of(HttpStatus.SERVICE_UNAVAILABLE, MediaType.PLAIN_TEXT_UTF_8, RES_NOT_OK);
    }
850125
public DnsAddressEndpointGroup build() {
        return new DnsAddressEndpointGroup(eventLoop(), minTtl(), maxTtl(),
                                           serverAddressStreamProvider(), backoff(),
                                           resolvedAddressTypes, hostname(), port);
    }
392339
private ServiceRegistration.EndpointHealthCheck endpointHealthCheck(String portName) {
    if (healthCheck() instanceof HttpHealthCheck) {
      final HttpHealthCheck httpHealthCheck = (HttpHealthCheck) healthCheck();
      if (portName.equals(httpHealthCheck.getPort())) {
        return ServiceRegistration.EndpointHealthCheck.newHttpCheck(httpHealthCheck.getPath());
      }
    } else if (healthCheck() instanceof TcpHealthCheck) {
      if (portName.equals(((TcpHealthCheck) healthCheck()).getPort())) {
        return ServiceRegistration.EndpointHealthCheck.newTcpCheck();
      }
    }
    return null;
  }
1035011
public LookupService createLookupService(final String endpointUrl) {
        return new RestAdapter.Builder()
            .setEndpoint(endpointUrl)
            .setErrorHandler(errorHandler)
            .setConverter(new JacksonLookupConverter(jsonFactory))
            .build().create(LookupService.class);
    }
889305
@Override
    protected void doHealthCheck(final Health.Builder builder) {
        val samlServices = servicesManager.findServiceBy(registeredService -> registeredService instanceof SamlRegisteredService);
        val availableResolvers = this.metadataResolutionPlan.getRegisteredMetadataResolvers();
        LOGGER.debug("There are [{}] metadata resolver(s) available in the chain", availableResolvers.size());

        builder.up();

        samlServices
            .stream()
            .map(SamlRegisteredService.class::cast)
            .forEach(service -> {
                val map = new LinkedHashMap<String, Object>();
                map.put("name", service.getName());
                map.put("id", service.getId());
                map.put("metadataLocation", service.getMetadataLocation());
                map.put("serviceId", service.getServiceId());
                val available = availableResolvers
                    .stream()
                    .filter(Objects::nonNull)
                    .peek(r -> LOGGER.debug("Checking if metadata resolver [{}] is available for service [{}]", r.getName(), service.getName()))
                    .anyMatch(r -> r.isAvailable(service));
                map.put("availability", BooleanUtils.toStringYesNo(available));
                builder.withDetail(service.getName(), map);
                if (!available) {
                    LOGGER.debug("No metadata resolver is available for service [{}]", service.getName());
                    builder.down();
                }
            });
    }
446748
static public ContentHandleFactory newFactory() {
    return new ContentHandleFactory() {
      @Override
      public Class<?>[] getHandledClasses() {
        return new Class<?>[]{ JsonNode.class };
      }
      @Override
      public boolean isHandled(Class<?> type) {
        return JsonNode.class.isAssignableFrom(type);
      }
      @Override
      public <C> ContentHandle<C> newHandle(Class<C> type) {
        @SuppressWarnings("unchecked")
        ContentHandle<C> handle = isHandled(type) ?
                                  (ContentHandle<C>) new JacksonHandle() : null;
        return handle;
      }
    };
  }
1253429
@RequestMapping(value = "/endpointdoc", method = RequestMethod.GET)
    public @ResponseBody
    Set<RequestMappingInfo> getEndpoints() {

        return this.service.getEndpoints(requestMappingHandlerMapping);
    }
259385
public Retrofit build() {
        checkState(baseUrl != null, "baseUrl not set");
        final URI uri = URI.create(baseUrl);
        final String fullUri = SessionProtocol.of(uri.getScheme()) + "://" + uri.getAuthority();
        final HttpClient baseHttpClient = HttpClient.of(
                clientFactory, fullUri, configurator.apply(fullUri, new ClientOptionsBuilder()).build());
        return retrofitBuilder.baseUrl(convertToOkHttpUrl(baseHttpClient, uri.getPath(), GROUP_PREFIX))
                              .callFactory(new ArmeriaCallFactory(
                                      baseHttpClient, clientFactory, configurator,
                                      streaming ? SubscriberFactory.streaming(callbackExecutor)
                                                : SubscriberFactory.blocking()))
                              .build();
    }
276355
public UserGroupCallback build() {
        UserGroupCallback callback = null;
        Properties properties = _propertiesBuilder.build();
        if (_userGroupCallbackClass != null) {
            callback = construct(properties);
        }
        if (callback == null && USER_CALLBACK_IMPL != null) {
            try {
                if ("props".equalsIgnoreCase(USER_CALLBACK_IMPL)) {
                    callback = new JBossUserGroupCallbackImpl(properties);
                } else {
                    callback = UserDataServiceProvider.getUserGroupCallback();
                }
            } catch (Throwable t) {
                // we might get here if on Karaf vs. JBoss
                // keep checkstyle happy ("at least one statement")
                t.getMessage();
            }
        }
        if (callback == null) {
            callback = new PropertiesUserGroupCallback(properties);
        }
        return callback;
    }
292186
@SuppressWarnings("deprecation")
    private static RestApiConfig initRestApiConfig(HazelcastProperties properties, Config config) {
        boolean isAdvancedNetwork = config.getAdvancedNetworkConfig().isEnabled();
        RestApiConfig restApiConfig = config.getNetworkConfig().getRestApiConfig();
        boolean isRestConfigPresent = isAdvancedNetwork
                ? config.getAdvancedNetworkConfig().getEndpointConfigs().get(EndpointQualifier.REST) != null
                : restApiConfig != null;

        if (isRestConfigPresent) {
            // ensure the legacy Hazelcast group properties are not provided
            ensurePropertyNotConfigured(properties, GroupProperty.REST_ENABLED);
            ensurePropertyNotConfigured(properties, GroupProperty.HTTP_HEALTHCHECK_ENABLED);
        }

        if (isRestConfigPresent && isAdvancedNetwork) {
            restApiConfig = new RestApiConfig();
            restApiConfig.setEnabled(true);

            RestServerEndpointConfig restServerEndpointConfig = config.getAdvancedNetworkConfig().getRestEndpointConfig();
            restApiConfig.setEnabledGroups(restServerEndpointConfig.getEnabledGroups());

        } else if (!isRestConfigPresent)  {
            restApiConfig = new RestApiConfig();
            if (checkAndLogPropertyDeprecated(properties, GroupProperty.REST_ENABLED)) {
                restApiConfig.setEnabled(true);
                restApiConfig.enableAllGroups();
            }
            if (checkAndLogPropertyDeprecated(properties, GroupProperty.HTTP_HEALTHCHECK_ENABLED)) {
                restApiConfig.setEnabled(true);
                restApiConfig.enableGroups(RestEndpointGroup.HEALTH_CHECK);
            }
        }

        return restApiConfig;
    }
394502
@Nullable
    public static EndpointGroup get(String groupName) {
        groupName = normalizeGroupName(groupName);
        final EndpointSelector endpointSelector = serverGroups.get(groupName);
        if (endpointSelector == null) {
            return null;
        }
        return endpointSelector.group();
    }
367049
public static HttpResourceGroup createHttpResourceGroup(String name, ClientOptions options) {
        return factory.createHttpResourceGroup(name, options);
    }
255454
protected HTTPResponse createHTTPResponse(int statusCode,String responseContent)
    {
        //create HTTP response
        HTTPResponse httpResponse=new HTTPResponse();
        httpResponse.setStatusCode(statusCode);
        httpResponse.setContent(responseContent);

        return httpResponse;
    }
525830
public GetUsersTopArtistsRequest.Builder getUsersTopArtists() {
    return new GetUsersTopArtistsRequest.Builder(accessToken)
            .setDefaults(httpManager, scheme, host, port);
  }