/**
* Visit reader class
*/
public void visit(BaseReader br) {
// FIXME, make as assert here about no class cast exception
ClusterReader cRdr = (ClusterReader) br;
try {
_c.setName(cRdr.getName());
_c.setPolicy(cRdr.getLbPolicy());
_c.setPolicyModule(cRdr.getLbPolicyModule());
} catch (LbReaderException le) {
// XXX ignore
}
InstanceReader[] iRdrs = null;
try {
iRdrs = cRdr.getInstances();
} catch (LbReaderException le) {
// XXX ignore
}
if ((iRdrs != null) && (iRdrs.length > 0 ) ){
boolean[] values = new boolean[iRdrs.length];
// XXX check if setting to true is required and is ok.
for(int i=0; i < iRdrs.length; i++) {
values[i] = true;
}
_c.setInstance(values);
for(int i=0; i < iRdrs.length; i++) {
iRdrs[i].accept(new InstanceVisitor(_c, i));
}
}
HealthCheckerReader hcRdr = null;
try {
hcRdr = cRdr.getHealthChecker();
} catch (LbReaderException le) {
// XXX ignore
}
if (hcRdr != null) {
hcRdr.accept(new HealthCheckerVisitor(_c));
}
WebModuleReader[] wRdrs = null;
try {
wRdrs = cRdr.getWebModules();
} catch (LbReaderException le) {
// XXX ignore
}
if ((wRdrs != null) && (wRdrs.length > 0 ) ){