LoadBalancerspublic class LoadBalancers extends com.sun.enterprise.config.ConfigBean implements SerializableThis 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 void | addComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.add(c);
| public int | addLoadBalancer(LoadBalancer value)
return addLoadBalancer(value, true);
| public int | addLoadBalancer(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 void | dump(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.String | dumpBeanNode()
StringBuffer str = new StringBuffer();
str.append("LoadBalancers\n"); // NOI18N
this.dump(str, "\n "); // NOI18N
return str.toString();
| public static java.lang.String | getDefaultAttributeValue(java.lang.String attr)
if(attr == null) return null;
attr = attr.trim();
return null;
| public LoadBalancer | getLoadBalancer(int index)
return (LoadBalancer)this.getValue(LOAD_BALANCER, index);
| public LoadBalancer[] | getLoadBalancer()
return (LoadBalancer[])this.getValues(LOAD_BALANCER);
| public LoadBalancer | getLoadBalancerByName(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.String | getRelativeXPath()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);
| void | initialize(int options)
| public LoadBalancer | newLoadBalancer()Create a new bean using it's default constructor.
This does not add it to any bean graph.
return new LoadBalancer();
| public static void | removeComparator(org.netbeans.modules.schema2beans.BeanComparator c)
comparators.remove(c);
| public int | removeLoadBalancer(LoadBalancer value)
return this.removeValue(LOAD_BALANCER, value);
| public int | removeLoadBalancer(LoadBalancer value, boolean overwrite)
return this.removeValue(LOAD_BALANCER, value, overwrite);
| public void | setLoadBalancer(LoadBalancer[] value)
this.setValue(LOAD_BALANCER, value);
| public int | sizeLoadBalancer()
return this.size(LOAD_BALANCER);
| public void | validate()
|
|