Class LoadbalancerReaderImpl
- java.lang.Object
-
- org.glassfish.loadbalancer.admin.cli.reader.impl.LoadbalancerReaderImpl
-
- All Implemented Interfaces:
BaseReader
,LoadbalancerReader
public class LoadbalancerReaderImpl extends Object implements LoadbalancerReader
Reader class to get information about load balancer configuration.- Author:
- Kshitiz Saxena
-
-
Field Summary
-
Fields inherited from interface org.glassfish.loadbalancer.admin.cli.reader.api.LoadbalancerReader
ACTIVE_HEALTH_CHECK, ACTIVE_HEALTH_CHECK_VALUE, DISABLE_TIMEOUT_IN_MINUTES_VALUE, HTTPS_ROUTING, HTTPS_ROUTING_VALUE, LAST_EXPORTED, LBENABLED_VALUE, NUM_HEALTH_CHECK, NUM_HEALTH_CHECK_VALUE, PREFERRED_FAILOVER_INSTANCE, PREFERRED_FAILOVER_INSTANCE_VALUE, RELOAD_INTERVAL, RELOAD_INTERVAL_VALUE, REQ_MONITOR_DATA, REQ_MONITOR_DATA_VALUE, RESP_TIMEOUT, RESP_TIMEOUT_VALUE, REWRITE_COOKIES, REWRITE_COOKIES_VALUE, REWRITE_LOCATION, REWRITE_LOCATION_VALUE, ROUTE_COOKIE
-
-
Constructor Summary
Constructors Constructor Description LoadbalancerReaderImpl(Domain domain, ApplicationRegistry appRegistry, Set<String> clusters, Properties properties)
LoadbalancerReaderImpl(Domain domain, ApplicationRegistry appRegistry, LbConfig lbConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Visitor v)
Accepts a visitor and calls its visit methodClusterReader[]
getClusters()
Returns the cluster info that are load balanced by this LB.ClusterReader[]
getClustersData()
ClusterReader[]
getClustersDataFromLBConfig()
LbConfig
getLbConfig()
Returns the lbconfig associated with the load balancerString
getName()
Returns the name of the load balancerPropertyReader[]
getProperties()
Returns properties of the load balancer.
-
-
-
Constructor Detail
-
LoadbalancerReaderImpl
public LoadbalancerReaderImpl(Domain domain, ApplicationRegistry appRegistry, Set<String> clusters, Properties properties)
-
LoadbalancerReaderImpl
public LoadbalancerReaderImpl(Domain domain, ApplicationRegistry appRegistry, LbConfig lbConfig)
-
-
Method Detail
-
getProperties
public PropertyReader[] getProperties() throws LbReaderException
Returns properties of the load balancer. For example response-timeout-in-seconds, reload-poll-interval-in-seconds and https-routing etc.- Specified by:
getProperties
in interfaceLoadbalancerReader
- Returns:
- PropertyReader[] array of properties
- Throws:
LbReaderException
-
getClusters
public ClusterReader[] getClusters() throws LbReaderException
Returns the cluster info that are load balanced by this LB.- Specified by:
getClusters
in interfaceLoadbalancerReader
- Returns:
- ClusterReader array of cluster readers
- Throws:
LbReaderException
-
getClustersData
public ClusterReader[] getClustersData() throws LbReaderException
- Throws:
LbReaderException
-
getClustersDataFromLBConfig
public ClusterReader[] getClustersDataFromLBConfig() throws LbReaderException
- Throws:
LbReaderException
-
getName
public String getName() throws LbReaderException
Returns the name of the load balancer- Specified by:
getName
in interfaceLoadbalancerReader
- Returns:
- String name of the LB
- Throws:
LbReaderException
-
accept
public void accept(Visitor v) throws Exception
Description copied from interface:BaseReader
Accepts a visitor and calls its visit method- Specified by:
accept
in interfaceBaseReader
- Throws:
Exception
-
getLbConfig
public LbConfig getLbConfig()
Description copied from interface:LoadbalancerReader
Returns the lbconfig associated with the load balancer- Specified by:
getLbConfig
in interfaceLoadbalancerReader
- Returns:
- LbConfig lbconfig of the LB
-
-