org.dasein.cloud.cloudstack.network
Class LoadBalancers

java.lang.Object
  extended by org.dasein.cloud.cloudstack.network.LoadBalancers
All Implemented Interfaces:
AccessControlledService, LoadBalancerSupport

public class LoadBalancers
extends Object
implements LoadBalancerSupport


Field Summary
static String ASSIGN_TO_LOAD_BALANCER_RULE
           
static String CREATE_LOAD_BALANCER_RULE
           
static String DELETE_LOAD_BALANCER_RULE
           
static String LIST_LOAD_BALANCER_RULE_INSTANCES
           
static String LIST_LOAD_BALANCER_RULES
           
static String REMOVE_FROM_LOAD_BALANCER_RULE
           
 
Fields inherited from interface org.dasein.cloud.network.LoadBalancerSupport
ADD_DATA_CENTERS, ADD_VMS, ANY, CREATE_LOAD_BALANCER, GET_LOAD_BALANCER, LIST_LOAD_BALANCER, REMOVE_DATA_CENTERS, REMOVE_LOAD_BALANCER, REMOVE_VMS
 
Method Summary
 void addDataCenters(String toLoadBalancerId, String... dataCenterIds)
           
 void addServers(String toLoadBalancerId, String... serverIds)
           
 String create(String name, String description, String addressId, String[] dcIds, LbListener[] listeners, String[] servers)
           
 LoadBalancerAddressType getAddressType()
           
 LoadBalancer getLoadBalancer(String loadBalancerId)
           
 String getLoadBalancerForAddress(String address)
           
 int getMaxPublicPorts()
           
 String getProviderTermForLoadBalancer(Locale locale)
           
 boolean isAddressAssignedByProvider()
           
 boolean isDataCenterLimited()
           
 boolean isSubscribed()
           
 Iterable<LoadBalancer> listLoadBalancers()
           
 Iterable<ResourceStatus> listLoadBalancerStatus()
           
 Iterable<LbAlgorithm> listSupportedAlgorithms()
           
 Iterable<IPVersion> listSupportedIPVersions()
           
 Iterable<LbProtocol> listSupportedProtocols()
           
 String[] mapServiceAction(ServiceAction action)
           
 void remove(String loadBalancerId)
           
 void removeDataCenters(String fromLoadBalancerId, String... dataCenterIds)
           
 void removeServers(String toLoadBalancerId, String... serverIds)
           
 boolean requiresListenerOnCreate()
           
 boolean requiresServerOnCreate()
           
 boolean supportsMonitoring()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSIGN_TO_LOAD_BALANCER_RULE

public static final String ASSIGN_TO_LOAD_BALANCER_RULE
See Also:
Constant Field Values

CREATE_LOAD_BALANCER_RULE

public static final String CREATE_LOAD_BALANCER_RULE
See Also:
Constant Field Values

DELETE_LOAD_BALANCER_RULE

public static final String DELETE_LOAD_BALANCER_RULE
See Also:
Constant Field Values

LIST_LOAD_BALANCER_RULES

public static final String LIST_LOAD_BALANCER_RULES
See Also:
Constant Field Values

LIST_LOAD_BALANCER_RULE_INSTANCES

public static final String LIST_LOAD_BALANCER_RULE_INSTANCES
See Also:
Constant Field Values

REMOVE_FROM_LOAD_BALANCER_RULE

public static final String REMOVE_FROM_LOAD_BALANCER_RULE
See Also:
Constant Field Values
Method Detail

addDataCenters

public void addDataCenters(String toLoadBalancerId,
                           String... dataCenterIds)
                    throws CloudException,
                           InternalException
Specified by:
addDataCenters in interface LoadBalancerSupport
Throws:
CloudException
InternalException

addServers

public void addServers(String toLoadBalancerId,
                       String... serverIds)
                throws CloudException,
                       InternalException
Specified by:
addServers in interface LoadBalancerSupport
Throws:
CloudException
InternalException

create

public String create(String name,
                     String description,
                     String addressId,
                     String[] dcIds,
                     LbListener[] listeners,
                     String[] servers)
              throws CloudException,
                     InternalException
Specified by:
create in interface LoadBalancerSupport
Throws:
CloudException
InternalException

getAddressType

public LoadBalancerAddressType getAddressType()
                                       throws CloudException,
                                              InternalException
Specified by:
getAddressType in interface LoadBalancerSupport
Throws:
CloudException
InternalException

getLoadBalancer

public LoadBalancer getLoadBalancer(String loadBalancerId)
                             throws CloudException,
                                    InternalException
Specified by:
getLoadBalancer in interface LoadBalancerSupport
Throws:
CloudException
InternalException

getMaxPublicPorts

public int getMaxPublicPorts()
                      throws CloudException,
                             InternalException
Specified by:
getMaxPublicPorts in interface LoadBalancerSupport
Throws:
CloudException
InternalException

getProviderTermForLoadBalancer

public String getProviderTermForLoadBalancer(Locale locale)
Specified by:
getProviderTermForLoadBalancer in interface LoadBalancerSupport

listLoadBalancerStatus

public Iterable<ResourceStatus> listLoadBalancerStatus()
                                                throws CloudException,
                                                       InternalException
Specified by:
listLoadBalancerStatus in interface LoadBalancerSupport
Throws:
CloudException
InternalException

listSupportedAlgorithms

public Iterable<LbAlgorithm> listSupportedAlgorithms()
Specified by:
listSupportedAlgorithms in interface LoadBalancerSupport

listSupportedIPVersions

@Nonnull
public Iterable<IPVersion> listSupportedIPVersions()
                                            throws CloudException,
                                                   InternalException
Specified by:
listSupportedIPVersions in interface LoadBalancerSupport
Throws:
CloudException
InternalException

listSupportedProtocols

public Iterable<LbProtocol> listSupportedProtocols()
Specified by:
listSupportedProtocols in interface LoadBalancerSupport

isAddressAssignedByProvider

public boolean isAddressAssignedByProvider()
                                    throws CloudException,
                                           InternalException
Specified by:
isAddressAssignedByProvider in interface LoadBalancerSupport
Throws:
CloudException
InternalException

isDataCenterLimited

public boolean isDataCenterLimited()
Specified by:
isDataCenterLimited in interface LoadBalancerSupport

mapServiceAction

@Nonnull
public String[] mapServiceAction(@Nonnull
                                         ServiceAction action)
Specified by:
mapServiceAction in interface AccessControlledService

requiresListenerOnCreate

public boolean requiresListenerOnCreate()
                                 throws CloudException,
                                        InternalException
Specified by:
requiresListenerOnCreate in interface LoadBalancerSupport
Throws:
CloudException
InternalException

requiresServerOnCreate

public boolean requiresServerOnCreate()
                               throws CloudException,
                                      InternalException
Specified by:
requiresServerOnCreate in interface LoadBalancerSupport
Throws:
CloudException
InternalException

isSubscribed

public boolean isSubscribed()
                     throws CloudException,
                            InternalException
Specified by:
isSubscribed in interface LoadBalancerSupport
Throws:
CloudException
InternalException

supportsMonitoring

public boolean supportsMonitoring()
Specified by:
supportsMonitoring in interface LoadBalancerSupport

listLoadBalancers

public Iterable<LoadBalancer> listLoadBalancers()
                                         throws CloudException,
                                                InternalException
Specified by:
listLoadBalancers in interface LoadBalancerSupport
Throws:
CloudException
InternalException

remove

public void remove(String loadBalancerId)
            throws CloudException,
                   InternalException
Specified by:
remove in interface LoadBalancerSupport
Throws:
CloudException
InternalException

removeDataCenters

public void removeDataCenters(String fromLoadBalancerId,
                              String... dataCenterIds)
                       throws CloudException,
                              InternalException
Specified by:
removeDataCenters in interface LoadBalancerSupport
Throws:
CloudException
InternalException

removeServers

public void removeServers(String toLoadBalancerId,
                          String... serverIds)
                   throws CloudException,
                          InternalException
Specified by:
removeServers in interface LoadBalancerSupport
Throws:
CloudException
InternalException

getLoadBalancerForAddress

public String getLoadBalancerForAddress(String address)
                                 throws InternalException,
                                        CloudException
Throws:
InternalException
CloudException


Copyright © 2012 enStratus Networks Inc. All Rights Reserved.