org.jclouds.elb.loadbalancer.strategy
Class ELBLoadBalanceNodesStrategy

java.lang.Object
  extended by org.jclouds.elb.loadbalancer.strategy.ELBLoadBalanceNodesStrategy
All Implemented Interfaces:
LoadBalanceNodesStrategy

@Singleton
public class ELBLoadBalanceNodesStrategy
extends Object
implements LoadBalanceNodesStrategy

Author:
Adrian Cole

Field Summary
protected  ELBApi api
           
protected  com.google.common.base.Function<LoadBalancerInRegion,LoadBalancerMetadata> converter
           
protected  Logger logger
           
 
Constructor Summary
protected ELBLoadBalanceNodesStrategy(ELBApi api, com.google.common.base.Function<LoadBalancerInRegion,LoadBalancerMetadata> converter)
           
 
Method Summary
 LoadBalancerMetadata createLoadBalancerInLocation(Location location, String name, String protocol, int loadBalancerPort, int instancePort, Iterable<? extends NodeMetadata> nodes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

@Named(value="jclouds.loadbalancer")
protected Logger logger

api

protected final ELBApi api

converter

protected final com.google.common.base.Function<LoadBalancerInRegion,LoadBalancerMetadata> converter
Constructor Detail

ELBLoadBalanceNodesStrategy

@Inject
protected ELBLoadBalanceNodesStrategy(ELBApi api,
                                             com.google.common.base.Function<LoadBalancerInRegion,LoadBalancerMetadata> converter)
Method Detail

createLoadBalancerInLocation

public LoadBalancerMetadata createLoadBalancerInLocation(Location location,
                                                         String name,
                                                         String protocol,
                                                         int loadBalancerPort,
                                                         int instancePort,
                                                         Iterable<? extends NodeMetadata> nodes)
Specified by:
createLoadBalancerInLocation in interface LoadBalanceNodesStrategy
Parameters:
location - null if default
protocol - LoadBalancer transport protocol to use for routing - TCP or HTTP. This property cannot be modified for the life of the LoadBalancer.
loadBalancerPort - The external TCP port of the LoadBalancer. Valid LoadBalancer ports are - 80, 443 and 1024 through 65535. This property cannot be modified for the life of the LoadBalancer.
instancePort - The InstancePort data type is simple type of type: integer. It is the TCP port on which the server on the instance is listening. Valid instance ports are one (1) through 65535. This property cannot be modified for the life of the LoadBalancer.
nodes - nodes to loadbalance
Returns:
newly created loadbalancer
See Also:
ComputeService


Copyright © 2009-2012 jclouds. All Rights Reserved.