@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode()); hashCode = prime * hashCode + ((getHealthCheck() == null) ? 0 : getHealthCheck().hashCode()); return hashCode; }
/** * Constructs a new ConfigureHealthCheckRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param loadBalancerName * The name of the load balancer. * @param healthCheck * The configuration information. */ public ConfigureHealthCheckRequest(String loadBalancerName, HealthCheck healthCheck) { setLoadBalancerName(loadBalancerName); setHealthCheck(healthCheck); }
/** * Sets up the heath check on the given load balancer. * The target should be in format protocol:port/path (e.g. http:8080/index.html) * * @param loadBalancerName * @param target * @param healthyThresh * @param unhealthyThresh * @param interval * @param timeout * @param elbClient */ public void setupHealthCheck(String loadBalancerName, String target, int healthyThresh, int unhealthyThresh, int interval, int timeout, AmazonElasticLoadBalancing elbClient) { HealthCheck hCheck = new HealthCheck() .withTarget(target) .withHealthyThreshold(healthyThresh) .withUnhealthyThreshold(unhealthyThresh) .withInterval(interval) .withTimeout(timeout); ConfigureHealthCheckRequest healthRequest = new ConfigureHealthCheckRequest() .withHealthCheck(hCheck) .withLoadBalancerName(loadBalancerName); @SuppressWarnings("unused") ConfigureHealthCheckResult healthResult = elbClient.configureHealthCheck(healthRequest); }
/** * <p> * The name of the load balancer. * </p> * * @param loadBalancerName * The name of the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureHealthCheckRequest withLoadBalancerName(String loadBalancerName) { setLoadBalancerName(loadBalancerName); return this; }
/** * <p> * The configuration information. * </p> * * @param healthCheck * The configuration information. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureHealthCheckRequest withHealthCheck(HealthCheck healthCheck) { setHealthCheck(healthCheck); return this; }
private void configureHealthCheck(AmazonElasticLoadBalancing loadBalancing, LoadBalancerDescription source, String loadBalancerName) { HealthCheck healthCheck = new HealthCheck() .withTarget(source.getHealthCheck().getTarget()) .withInterval(source.getHealthCheck().getInterval()) .withTimeout(source.getHealthCheck().getTimeout()) .withUnhealthyThreshold(source.getHealthCheck().getUnhealthyThreshold()) .withHealthyThreshold(source.getHealthCheck().getHealthyThreshold()); loadBalancing.configureHealthCheck(new ConfigureHealthCheckRequest(loadBalancerName, healthCheck)); }
/** * <p> * The name of the load balancer. * </p> * * @param loadBalancerName * The name of the load balancer. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureHealthCheckRequest withLoadBalancerName(String loadBalancerName) { setLoadBalancerName(loadBalancerName); return this; }
/** * <p> * The configuration information. * </p> * * @param healthCheck * The configuration information. * @return Returns a reference to this object so that method calls can be chained together. */ public ConfigureHealthCheckRequest withHealthCheck(HealthCheck healthCheck) { setHealthCheck(healthCheck); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConfigureHealthCheckRequest == false) return false; ConfigureHealthCheckRequest other = (ConfigureHealthCheckRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false) return false; if (other.getHealthCheck() == null ^ this.getHealthCheck() == null) return false; if (other.getHealthCheck() != null && other.getHealthCheck().equals(this.getHealthCheck()) == false) return false; return true; }
/** * Constructs a new ConfigureHealthCheckRequest object. Callers should use * the setter or fluent setter (with...) methods to initialize any * additional object members. * * @param loadBalancerName <p> * The name of the load balancer. * </p> * @param healthCheck <p> * The configuration information. * </p> */ public ConfigureHealthCheckRequest(String loadBalancerName, HealthCheck healthCheck) { setLoadBalancerName(loadBalancerName); setHealthCheck(healthCheck); }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerName() != null) sb.append("LoadBalancerName: ").append(getLoadBalancerName()).append(","); if (getHealthCheck() != null) sb.append("HealthCheck: ").append(getHealthCheck()); sb.append("}"); return sb.toString(); }
/** * Constructs a new ConfigureHealthCheckRequest object. Callers should use the setter or fluent setter (with...) * methods to initialize any additional object members. * * @param loadBalancerName * The name of the load balancer. * @param healthCheck * The configuration information. */ public ConfigureHealthCheckRequest(String loadBalancerName, HealthCheck healthCheck) { setLoadBalancerName(loadBalancerName); setHealthCheck(healthCheck); }
request.setHttpMethod(HttpMethodName.POST); if (configureHealthCheckRequest.getLoadBalancerName() != null) { request.addParameter("LoadBalancerName", StringUtils.fromString(configureHealthCheckRequest.getLoadBalancerName())); HealthCheck healthCheck = configureHealthCheckRequest.getHealthCheck(); if (healthCheck != null) {
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode()); hashCode = prime * hashCode + ((getHealthCheck() == null) ? 0 : getHealthCheck().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConfigureHealthCheckRequest == false) return false; ConfigureHealthCheckRequest other = (ConfigureHealthCheckRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false) return false; if (other.getHealthCheck() == null ^ this.getHealthCheck() == null) return false; if (other.getHealthCheck() != null && other.getHealthCheck().equals(this.getHealthCheck()) == false) return false; return true; } }
/** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerName() != null) sb.append("LoadBalancerName: " + getLoadBalancerName() + ","); if (getHealthCheck() != null) sb.append("HealthCheck: " + getHealthCheck()); sb.append("}"); return sb.toString(); }
public Request<ConfigureHealthCheckRequest> marshall( ConfigureHealthCheckRequest configureHealthCheckRequest) { if (configureHealthCheckRequest == null) { throw new AmazonClientException( "Invalid argument passed to marshall(ConfigureHealthCheckRequest)"); } Request<ConfigureHealthCheckRequest> request = new DefaultRequest<ConfigureHealthCheckRequest>( configureHealthCheckRequest, "AmazonElasticLoadBalancing"); request.addParameter("Action", "ConfigureHealthCheck"); request.addParameter("Version", "2012-06-01"); String prefix; if (configureHealthCheckRequest.getLoadBalancerName() != null) { prefix = "LoadBalancerName"; String loadBalancerName = configureHealthCheckRequest.getLoadBalancerName(); request.addParameter(prefix, StringUtils.fromString(loadBalancerName)); } if (configureHealthCheckRequest.getHealthCheck() != null) { prefix = "HealthCheck"; HealthCheck healthCheck = configureHealthCheckRequest.getHealthCheck(); HealthCheckStaxMarshaller.getInstance().marshall(healthCheck, request, prefix + "."); } return request; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLoadBalancerName() == null) ? 0 : getLoadBalancerName().hashCode()); hashCode = prime * hashCode + ((getHealthCheck() == null) ? 0 : getHealthCheck().hashCode()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ConfigureHealthCheckRequest == false) return false; ConfigureHealthCheckRequest other = (ConfigureHealthCheckRequest) obj; if (other.getLoadBalancerName() == null ^ this.getLoadBalancerName() == null) return false; if (other.getLoadBalancerName() != null && other.getLoadBalancerName().equals(this.getLoadBalancerName()) == false) return false; if (other.getHealthCheck() == null ^ this.getHealthCheck() == null) return false; if (other.getHealthCheck() != null && other.getHealthCheck().equals(this.getHealthCheck()) == false) return false; return true; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getLoadBalancerName() != null) sb.append("LoadBalancerName: ").append(getLoadBalancerName()).append(","); if (getHealthCheck() != null) sb.append("HealthCheck: ").append(getHealthCheck()); sb.append("}"); return sb.toString(); }