use of io.gravitee.definition.model.endpoint.HttpEndpoint in project gravitee-gateway by gravitee-io.
the class EndpointHealthcheckResolver method resolve.
public EndpointRule resolve(Api api, Endpoint endpoint) {
if (endpoint.getType() == EndpointType.HTTP) {
HttpEndpoint httpEndpoint = (HttpEndpoint) endpoint;
HealthCheckService rootHealthCheck = api.getServices().get(HealthCheckService.class);
return new DefaultEndpointRule(api.getId(), endpoint, (httpEndpoint.getHealthCheck() == null || httpEndpoint.getHealthCheck().isInherit()) ? rootHealthCheck : httpEndpoint.getHealthCheck());
}
return null;
}
Aggregations