List of usage examples for com.amazonaws.services.elasticloadbalancing.model SetLoadBalancerPoliciesOfListenerRequest setLoadBalancerPort
public void setLoadBalancerPort(Integer loadBalancerPort)
The external port of the load balancer.
From source file:org.openinfinity.cloud.service.administrator.EC2Wrapper.java
License:Apache License
public void setLoadBalancerPoliciesOfListener(String policyName, String lbName, Integer lbPort) { if (this.cloudType == InstanceService.CLOUD_TYPE_AMAZON) { try {/*w w w .j a v a2 s .c o m*/ SetLoadBalancerPoliciesOfListenerRequest request = new SetLoadBalancerPoliciesOfListenerRequest(); request.setLoadBalancerName(lbName); request.setLoadBalancerPort(lbPort); ArrayList<String> policyList = new ArrayList<String>(); policyList.add(policyName); request.setPolicyNames(policyList); LOG.info(request.toString()); lb.setLoadBalancerPoliciesOfListener(request); } catch (Exception e) { String message = e.getMessage(); LOG.error("Error setting load balancer policy: " + message); ExceptionUtil.throwSystemException(message, e); } } }