org.glassfish.loadbalancer.admin.cli.reader.impl
Class InstanceReaderImpl

java.lang.Object
  extended by org.glassfish.loadbalancer.admin.cli.reader.impl.InstanceReaderImpl
All Implemented Interfaces:
BaseReader, InstanceReader

public class InstanceReaderImpl
extends java.lang.Object
implements InstanceReader

Provides instance information relavant to Load balancer tier.

Author:
Kshitiz Saxena

Constructor Summary
InstanceReaderImpl(Domain domain, Server server)
           
InstanceReaderImpl(Domain domain, ServerRef ref)
          Constructor
 
Method Summary
 void accept(Visitor v)
          Accepts a visitor and calls its visit method
 java.lang.String getDisableTimeoutInMinutes()
          This is used in quicescing.
 boolean getLbEnabled()
          Returns if the server is enabled in the load balancer or not.
 java.lang.String getListeners()
          Enlists both http and https listeners of this server instance It will be form "http:: https::"
 java.lang.String getName()
          Return server instance's name.
 java.lang.String getWeight()
          This is used in weighted round robin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceReaderImpl

public InstanceReaderImpl(Domain domain,
                          ServerRef ref)
Constructor


InstanceReaderImpl

public InstanceReaderImpl(Domain domain,
                          Server server)
Method Detail

getName

public java.lang.String getName()
                         throws LbReaderException
Return server instance's name.

Specified by:
getName in interface InstanceReader
Returns:
String instance' name
Throws:
LbReaderException

getLbEnabled

public boolean getLbEnabled()
                     throws LbReaderException
Returns if the server is enabled in the load balancer or not.

Specified by:
getLbEnabled in interface InstanceReader
Returns:
boolean true if enabled in LB; false if disabled
Throws:
LbReaderException

getDisableTimeoutInMinutes

public java.lang.String getDisableTimeoutInMinutes()
                                            throws LbReaderException
This is used in quicescing. Timeouts after this interval and disables the instance in the load balancer.

Specified by:
getDisableTimeoutInMinutes in interface InstanceReader
Returns:
String Disable time out in minutes
Throws:
LbReaderException

getWeight

public java.lang.String getWeight()
                           throws LbReaderException
This is used in weighted round robin. returns the weight of the instance

Specified by:
getWeight in interface InstanceReader
Returns:
String Weight of the instance
Throws:
LbReaderException

getListeners

public java.lang.String getListeners()
                              throws LbReaderException
Enlists both http and https listeners of this server instance It will be form "http:: https::"

Specified by:
getListeners in interface InstanceReader
Returns:
String Listener(s) info.
Throws:
LbReaderException

accept

public void accept(Visitor v)
            throws java.lang.Exception
Description copied from interface: BaseReader
Accepts a visitor and calls its visit method

Specified by:
accept in interface BaseReader
Throws:
java.lang.Exception


Copyright © 2012 GlassFish Community. All Rights Reserved.