use of com.amazonaws.services.elasticloadbalancing.model.ConfigureHealthCheckResult in project photon-model by vmware.
the class AWSLoadBalancerService method configureHealthCheck.
private DeferredResult<AWSLoadBalancerContext> configureHealthCheck(AWSLoadBalancerContext context) {
ConfigureHealthCheckRequest request = buildHealthCheckRequest(context);
if (request == null) {
return DeferredResult.completed(context);
}
String message = "Configure a health check to AWS Load Balancer with name [" + context.loadBalancerStateExpanded.name + "].";
AWSDeferredResultAsyncHandler<ConfigureHealthCheckRequest, ConfigureHealthCheckResult> handler = new AWSDeferredResultAsyncHandler<>(this, message);
context.client.configureHealthCheckAsync(request, handler);
return handler.toDeferredResult().thenApply(ignore -> context);
}
Aggregations