/**
* Visit reader class
*/
public void visit(BaseReader br) {
// FIXME, make as assert here about no class cast exception
LoadbalancerReader lbRdr = (LoadbalancerReader) br;
try {
_lb.setHttpPolicy(lbRdr.getHttpPolicy());
_lb.setSipPolicy(lbRdr.getSipPolicy());
_lb.setDcrFile(lbRdr.getDcrFile());
} catch (LbReaderException le) {
// XXX ignore
}
Property prop = null;
PropertyReader[] pRdrs = null;
try {
pRdrs = lbRdr.getProperties();
} catch (LbReaderException le) {
// should we throw this exception XXX ???
// or fill in with default values
}
if ((pRdrs != null) && (pRdrs.length > 0)) {
for (int i = 0; i < pRdrs.length; i++) {
prop = new Property();
pRdrs[i].accept(new PropertyVisitor(prop));
_lb.getProperty().add(prop);
}
}
ClusterReader[] cRdrs = null;
try {
cRdrs = lbRdr.getClusters();
} catch (LbReaderException le) {
// should we throw this exception XXX ???
// or fill in with default values
}