List of usage examples for com.amazonaws.services.elasticloadbalancing.model CreateLoadBalancerListenersRequest CreateLoadBalancerListenersRequest
public CreateLoadBalancerListenersRequest(String loadBalancerName, java.util.List<Listener> listeners)
From source file:web.component.impl.aws.AWSELBImpl.java
@Override public void createLoadBalancerListeners(String loadBalancerName, Collection<Listener> listeners) { if (loadBalancerName == null || loadBalancerName.isEmpty()) throw new IllegalArgumentException("Load Balancer Name not specified."); if (listeners == null || listeners.isEmpty()) throw new IllegalArgumentException("Listeners not specified."); awsHttpClient.createLoadBalancerListeners( new CreateLoadBalancerListenersRequest(loadBalancerName, new ArrayList<>(listeners))); }
From source file:web.component.impl.aws.AWSELBImpl.java
@Override public void createHttpListenerOfLoadBalancerWithPort(String loadBalancerName, int instancePort, int servicePort) { if (loadBalancerName == null || loadBalancerName.isEmpty()) throw new IllegalArgumentException("Load Balancer Name not specified."); if (instancePort < 0) throw new IllegalArgumentException("Invalid instance port specified."); if (servicePort < 0) throw new IllegalArgumentException("Invalid service port specified."); awsHttpClient.createLoadBalancerListeners( new CreateLoadBalancerListenersRequest(loadBalancerName, singletonList(getDefaultHttpListener() .withInstancePort(instancePort).withLoadBalancerPort(servicePort)))); }