Search in sources :

Example 1 with ConfigureHealthCheckResult

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);
}
Also used : AWSDeferredResultAsyncHandler(com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler) ConfigureHealthCheckRequest(com.amazonaws.services.elasticloadbalancing.model.ConfigureHealthCheckRequest) ConfigureHealthCheckResult(com.amazonaws.services.elasticloadbalancing.model.ConfigureHealthCheckResult)

Aggregations

ConfigureHealthCheckRequest (com.amazonaws.services.elasticloadbalancing.model.ConfigureHealthCheckRequest)1 ConfigureHealthCheckResult (com.amazonaws.services.elasticloadbalancing.model.ConfigureHealthCheckResult)1 AWSDeferredResultAsyncHandler (com.vmware.photon.controller.model.adapters.awsadapter.util.AWSDeferredResultAsyncHandler)1