/**
* 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.setSelfLoadbalance(cRdr.getSelfLoadbalance());
} catch (LbReaderException le) {
// XXX ignore
}
InstanceReader[] iRdrs = null;
try {
iRdrs = cRdr.getInstances();
} catch (LbReaderException le) {
// should we throw this exception XXX ???
// or fill in with default values
}
if ((iRdrs != null) && (iRdrs.length > 0)) {
Instance ins = null;
for (int i = 0; i < iRdrs.length; i++) {
ins = new Instance();
iRdrs[i].accept(new InstanceVisitor(ins));
_c.addInstance(ins);
}
}
WebModuleReader[] wRdrs = null;
try {
wRdrs = cRdr.getWebModules();
} catch (LbReaderException le) {
// XXX ignore
}
if ((wRdrs != null) && (wRdrs.length > 0)) {