Class InstanceReaderImpl
- java.lang.Object
-
- org.glassfish.loadbalancer.admin.cli.reader.impl.InstanceReaderImpl
-
- All Implemented Interfaces:
BaseReader,InstanceReader
public class InstanceReaderImpl extends Object implements InstanceReader
Provides instance information relavant to Load balancer tier.- Author:
- Kshitiz Saxena
-
-
Constructor Summary
Constructors Constructor Description InstanceReaderImpl(Domain domain, Server server)InstanceReaderImpl(Domain domain, ServerRef ref)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(Visitor v)Accepts a visitor and calls its visit methodStringgetDisableTimeoutInMinutes()This is used in quicescing.booleangetLbEnabled()Returns if the server is enabled in the load balancer or not.StringgetListeners()Enlists both http and https listeners of this server instance It will be form "http:: https: : " StringgetName()Return server instance's name.StringgetWeight()This is used in weighted round robin.
-
-
-
Method Detail
-
getName
public String getName() throws LbReaderException
Return server instance's name.- Specified by:
getNamein interfaceInstanceReader- Returns:
- String instance' name
- Throws:
LbReaderException
-
getLbEnabled
public boolean getLbEnabled() throws LbReaderExceptionReturns if the server is enabled in the load balancer or not.- Specified by:
getLbEnabledin interfaceInstanceReader- Returns:
- boolean true if enabled in LB; false if disabled
- Throws:
LbReaderException
-
getDisableTimeoutInMinutes
public String getDisableTimeoutInMinutes() throws LbReaderException
This is used in quicescing. Timeouts after this interval and disables the instance in the load balancer.- Specified by:
getDisableTimeoutInMinutesin interfaceInstanceReader- Returns:
- String Disable time out in minutes
- Throws:
LbReaderException
-
getWeight
public String getWeight() throws LbReaderException
This is used in weighted round robin. returns the weight of the instance- Specified by:
getWeightin interfaceInstanceReader- Returns:
- String Weight of the instance
- Throws:
LbReaderException
-
getListeners
public String getListeners() throws LbReaderException
Enlists both http and https listeners of this server instance It will be form "http:: https: : " - Specified by:
getListenersin interfaceInstanceReader- Returns:
- String Listener(s) info.
- Throws:
LbReaderException
-
accept
public void accept(Visitor v) throws Exception
Description copied from interface:BaseReaderAccepts a visitor and calls its visit method- Specified by:
acceptin interfaceBaseReader- Throws:
Exception
-
-