use of org.glassfish.loadbalancer.admin.cli.reader.api.IdempotentUrlPatternReader in project Payara by payara.
the class IdempotentUrlPatternVisitor method visit.
/**
* Visit reader class
*/
@Override
public void visit(BaseReader br) throws Exception {
// FIXME, make as assert here about no class cast exception
if (br instanceof IdempotentUrlPatternReader) {
IdempotentUrlPatternReader iRdr = (IdempotentUrlPatternReader) br;
_m.addIdempotentUrlPattern(true);
_m.setAttributeValue(WebModule.IDEMPOTENT_URL_PATTERN, _i, URL_PATTERN, iRdr.getUrlPattern());
_m.setAttributeValue(WebModule.IDEMPOTENT_URL_PATTERN, _i, RETRIES, iRdr.getNoOfRetries());
}
}
use of org.glassfish.loadbalancer.admin.cli.reader.api.IdempotentUrlPatternReader in project Payara by payara.
the class WebModuleVisitor method visit.
/**
* Visit reader class
*/
@Override
public void visit(BaseReader br) throws Exception {
// FIXME, make as assert here about no class cast exception
if (br instanceof BaseReader) {
WebModuleReader wRdr = (WebModuleReader) br;
_w.setContextRoot(wRdr.getContextRoot());
String url = wRdr.getErrorUrl();
if ((url != null) && (!"".equals(url))) {
// XXX start of bug fix for 6171814
_c.createAttribute(Cluster.WEB_MODULE, "error-url", "ErrorUrl", AttrProp.CDATA, null, "");
// XXX end of bug fix for 6171814
_w.setErrorUrl(wRdr.getErrorUrl());
}
_w.setEnabled(Boolean.toString(wRdr.getLbEnabled()));
_w.setDisableTimeoutInMinutes(wRdr.getDisableTimeoutInMinutes());
IdempotentUrlPatternReader[] iRdrs = wRdr.getIdempotentUrlPattern();
if ((iRdrs != null) && (iRdrs.length > 0)) {
for (int i = 0; i < iRdrs.length; i++) {
iRdrs[i].accept(new IdempotentUrlPatternVisitor(_w, i));
}
}
}
}
Aggregations