FileDocCategorySizeDatePackage
LoadBalancers.javaAPI DocGlassfish v2 API6351Fri May 26 10:47:08 BST 2006com.sun.enterprise.config.serverbeans

LoadBalancers

public class LoadBalancers extends com.sun.enterprise.config.ConfigBean implements Serializable
This generated bean class LoadBalancers matches the DTD element load-balancers

Fields Summary
static Vector
comparators
private static final org.netbeans.modules.schema2beans.Version
runtimeVersion
public static final String
LOAD_BALANCER
Constructors Summary
public LoadBalancers()


	  
		this(Common.USE_DEFAULT_VALUES);
	
public LoadBalancers(int options)

		super(comparators, runtimeVersion);
		// Properties (see root bean comments for the bean graph)
		initPropertyTables(1);
		this.createProperty("load-balancer", LOAD_BALANCER, 
			Common.TYPE_0_N | Common.TYPE_BEAN | Common.TYPE_KEY, 
			LoadBalancer.class);
		this.createAttribute(LOAD_BALANCER, "name", "Name", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(LOAD_BALANCER, "lb-config-name", "LbConfigName", 
						AttrProp.CDATA | AttrProp.REQUIRED,
						null, null);
		this.createAttribute(LOAD_BALANCER, "auto-apply-enabled", "AutoApplyEnabled", 
						AttrProp.CDATA,
						null, "false");
		this.initialize(options);
	
Methods Summary
public static voidaddComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.add(c);
	
public intaddLoadBalancer(LoadBalancer value)

		return addLoadBalancer(value, true);
	
public intaddLoadBalancer(LoadBalancer value, boolean overwrite)

		LoadBalancer old = getLoadBalancerByName(value.getName());
		if(old != null) {
			throw new ConfigException(StringManager.getManager(LoadBalancers.class).getString("cannotAddDuplicate",  "LoadBalancer"));
		}
		return this.addValue(LOAD_BALANCER, value, overwrite);
	
public voiddump(java.lang.StringBuffer str, java.lang.String indent)

		String s;
		Object o;
		org.netbeans.modules.schema2beans.BaseBean n;
		str.append(indent);
		str.append("LoadBalancer["+this.sizeLoadBalancer()+"]");	// NOI18N
		for(int i=0; i<this.sizeLoadBalancer(); i++)
		{
			str.append(indent+"\t");
			str.append("#"+i+":");
			n = (org.netbeans.modules.schema2beans.BaseBean) this.getLoadBalancer(i);
			if (n != null)
				n.dump(str, indent + "\t");	// NOI18N
			else
				str.append(indent+"\tnull");	// NOI18N
			this.dumpAttributes(LOAD_BALANCER, i, str, indent);
		}

	
public java.lang.StringdumpBeanNode()

		StringBuffer str = new StringBuffer();
		str.append("LoadBalancers\n");	// NOI18N
		this.dump(str, "\n  ");	// NOI18N
		return str.toString();
	
public static java.lang.StringgetDefaultAttributeValue(java.lang.String attr)

		if(attr == null) return null;
		attr = attr.trim();
	return null;
	
public LoadBalancergetLoadBalancer(int index)

		return (LoadBalancer)this.getValue(LOAD_BALANCER, index);
	
public LoadBalancer[]getLoadBalancer()

		return (LoadBalancer[])this.getValues(LOAD_BALANCER);
	
public LoadBalancergetLoadBalancerByName(java.lang.String id)

	 if (null != id) { id = id.trim(); }
	LoadBalancer[] o = getLoadBalancer();
	 if (o == null) return null;

	 for (int i=0; i < o.length; i++) {
	     if(o[i].getAttributeValue(Common.convertName(ServerTags.NAME)).equals(id)) {
	         return o[i];
	     }
	 }

		return null;
		
	
protected java.lang.StringgetRelativeXPath()
get the xpath representation for this element returns something like abc[@name='value'] or abc depending on the type of the bean

	    String ret = null;
	    ret = "load-balancers";
	    return (null != ret ? ret.trim() : null);
	
voidinitialize(int options)


	
public LoadBalancernewLoadBalancer()
Create a new bean using it's default constructor. This does not add it to any bean graph.

		return new LoadBalancer();
	
public static voidremoveComparator(org.netbeans.modules.schema2beans.BeanComparator c)

		comparators.remove(c);
	
public intremoveLoadBalancer(LoadBalancer value)

		return this.removeValue(LOAD_BALANCER, value);
	
public intremoveLoadBalancer(LoadBalancer value, boolean overwrite)

		return this.removeValue(LOAD_BALANCER, value, overwrite);
	
public voidsetLoadBalancer(LoadBalancer[] value)

		this.setValue(LOAD_BALANCER, value);
	
public intsizeLoadBalancer()

		return this.size(LOAD_BALANCER);
	
public voidvalidate()