@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getLoadBalancerPort() == null) ? 0 : getLoadBalancerPort().hashCode()); hashCode = prime * hashCode + ((getInstanceProtocol() == null) ? 0 : getInstanceProtocol().hashCode()); hashCode = prime * hashCode + ((getInstancePort() == null) ? 0 : getInstancePort().hashCode()); hashCode = prime * hashCode + ((getSSLCertificateId() == null) ? 0 : getSSLCertificateId().hashCode()); return hashCode; }
/** * 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 (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getLoadBalancerPort() != null) sb.append("LoadBalancerPort: ").append(getLoadBalancerPort()).append(","); if (getInstanceProtocol() != null) sb.append("InstanceProtocol: ").append(getInstanceProtocol()).append(","); if (getInstancePort() != null) sb.append("InstancePort: ").append(getInstancePort()).append(","); if (getSSLCertificateId() != null) sb.append("SSLCertificateId: ").append(getSSLCertificateId()); sb.append("}"); return sb.toString(); }
if (other.getInstanceProtocol() != null && other.getInstanceProtocol().equals(this.getInstanceProtocol()) == false) return false; if (other.getInstancePort() == null ^ this.getInstancePort() == null) return false; if (other.getInstancePort() != null && other.getInstancePort().equals(this.getInstancePort()) == false) return false; if (other.getSSLCertificateId() == null ^ this.getSSLCertificateId() == null)
if (listenersListValue.getInstancePort() != null) { request.addParameter("Listeners.member." + listenersListIndex + ".InstancePort", StringUtils.fromInteger(listenersListValue.getInstancePort()));
if (listenersListValue.getInstancePort() != null) { request.addParameter("Listeners.member." + listenersListIndex + ".InstancePort", StringUtils.fromInteger(listenersListValue.getInstancePort()));
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getLoadBalancerPort() == null) ? 0 : getLoadBalancerPort().hashCode()); hashCode = prime * hashCode + ((getInstanceProtocol() == null) ? 0 : getInstanceProtocol().hashCode()); hashCode = prime * hashCode + ((getInstancePort() == null) ? 0 : getInstancePort().hashCode()); hashCode = prime * hashCode + ((getSSLCertificateId() == null) ? 0 : getSSLCertificateId().hashCode()); return hashCode; }
/** * 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 (getProtocol() != null) sb.append("Protocol: " + getProtocol() + ","); if (getLoadBalancerPort() != null) sb.append("LoadBalancerPort: " + getLoadBalancerPort() + ","); if (getInstanceProtocol() != null) sb.append("InstanceProtocol: " + getInstanceProtocol() + ","); if (getInstancePort() != null) sb.append("InstancePort: " + getInstancePort() + ","); if (getSSLCertificateId() != null) sb.append("SSLCertificateId: " + getSSLCertificateId()); sb.append("}"); return sb.toString(); }
&& other.getInstanceProtocol().equals(this.getInstanceProtocol()) == false) return false; if (other.getInstancePort() == null ^ this.getInstancePort() == null) return false; if (other.getInstancePort() != null && other.getInstancePort().equals(this.getInstancePort()) == false) return false; if (other.getSSLCertificateId() == null ^ this.getSSLCertificateId() == null)
public void marshall(Listener _listener, Request<?> request, String _prefix) { String prefix; if (_listener.getProtocol() != null) { prefix = _prefix + "Protocol"; String protocol = _listener.getProtocol(); request.addParameter(prefix, StringUtils.fromString(protocol)); } if (_listener.getLoadBalancerPort() != null) { prefix = _prefix + "LoadBalancerPort"; Integer loadBalancerPort = _listener.getLoadBalancerPort(); request.addParameter(prefix, StringUtils.fromInteger(loadBalancerPort)); } if (_listener.getInstanceProtocol() != null) { prefix = _prefix + "InstanceProtocol"; String instanceProtocol = _listener.getInstanceProtocol(); request.addParameter(prefix, StringUtils.fromString(instanceProtocol)); } if (_listener.getInstancePort() != null) { prefix = _prefix + "InstancePort"; Integer instancePort = _listener.getInstancePort(); request.addParameter(prefix, StringUtils.fromInteger(instancePort)); } if (_listener.getSSLCertificateId() != null) { prefix = _prefix + "SSLCertificateId"; String sSLCertificateId = _listener.getSSLCertificateId(); request.addParameter(prefix, StringUtils.fromString(sSLCertificateId)); } }
public List<Listener> getListeners(LoadBalancerDescription sourceLoadBalancer, MigrateLoadBalancerResult result) { List<Listener> unmigratableListeners = sourceLoadBalancer.getListenerDescriptions().stream() .map(ListenerDescription::getListener) .filter(listenerCannotBeMigrated(source, target)).collect(Collectors.toList()); unmigratableListeners.forEach(l -> result.getWarnings().add( "The following listeners could not be created: " + l.getProtocol() + ":" + l.getLoadBalancerPort() + " => " + l.getInstanceProtocol() + ":" + l.getInstancePort() + " (certificate: " + l.getSSLCertificateId() + ")." )); List<Listener> listeners = sourceLoadBalancer.getListenerDescriptions().stream() .map(ListenerDescription::getListener) .filter(l -> l.getInstancePort() > 0) // strip out invalid load balancer listeners from legacy ELBs .collect(Collectors.toList()); listeners.removeAll(unmigratableListeners); return listeners; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProtocol() == null) ? 0 : getProtocol().hashCode()); hashCode = prime * hashCode + ((getLoadBalancerPort() == null) ? 0 : getLoadBalancerPort().hashCode()); hashCode = prime * hashCode + ((getInstanceProtocol() == null) ? 0 : getInstanceProtocol().hashCode()); hashCode = prime * hashCode + ((getInstancePort() == null) ? 0 : getInstancePort().hashCode()); hashCode = prime * hashCode + ((getSSLCertificateId() == null) ? 0 : getSSLCertificateId().hashCode()); return hashCode; }
/** * 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 (getProtocol() != null) sb.append("Protocol: ").append(getProtocol()).append(","); if (getLoadBalancerPort() != null) sb.append("LoadBalancerPort: ").append(getLoadBalancerPort()).append(","); if (getInstanceProtocol() != null) sb.append("InstanceProtocol: ").append(getInstanceProtocol()).append(","); if (getInstancePort() != null) sb.append("InstancePort: ").append(getInstancePort()).append(","); if (getSSLCertificateId() != null) sb.append("SSLCertificateId: ").append(getSSLCertificateId()); sb.append("}"); return sb.toString(); }
if (other.getInstanceProtocol() != null && other.getInstanceProtocol().equals(this.getInstanceProtocol()) == false) return false; if (other.getInstancePort() == null ^ this.getInstancePort() == null) return false; if (other.getInstancePort() != null && other.getInstancePort().equals(this.getInstancePort()) == false) return false; if (other.getSSLCertificateId() == null ^ this.getSSLCertificateId() == null)
public LoadBalancerAttributes getLoadBalancerAttributes(LoadBalancerDescription sourceLoadBalancer, AmazonElasticLoadBalancing sourceClient) { LoadBalancerAttributes sourceAttributes = sourceClient.describeLoadBalancerAttributes( new DescribeLoadBalancerAttributesRequest().withLoadBalancerName(sourceLoadBalancer.getLoadBalancerName())).getLoadBalancerAttributes(); if (sourceLoadBalancer.getListenerDescriptions().stream().anyMatch(l -> l.getListener().getInstancePort() == 0)) { sourceAttributes.setCrossZoneLoadBalancing(new CrossZoneLoadBalancing().withEnabled(true)); } return sourceAttributes; }
Listener listener = l.getListener(); IpPermission newPermission = new IpPermission().withIpProtocol("tcp") .withFromPort(listener.getInstancePort()).withToPort(listener.getInstancePort()) .withUserIdGroupPairs(new UserIdGroupPair().withGroupId(elbGroupId).withVpcId(target.getVpcId())); targetAmazonEC2.authorizeSecurityGroupIngress(new AuthorizeSecurityGroupIngressRequest()
if (listenersListValue.getInstancePort() != null) { request.addParameter("Listeners.member." + listenersListIndex + ".InstancePort", StringUtils.fromInteger(listenersListValue.getInstancePort()));
if (listenersListValue.getInstancePort() != null) { request.addParameter("Listeners.member." + listenersListIndex + ".InstancePort", StringUtils.fromInteger(listenersListValue.getInstancePort()));