serviceUrl.setReverseUrl(reverseUrl);
return serviceUrl;
}
ServiceUrl getLbServiceUrl(ServiceUrl serviceUrl, Node urlNode, String host) {
LbRoundRobinServiceUrl lbServiceUrl = new LbRoundRobinServiceUrl(serverConfig);
lbServiceUrl.setPath(serviceUrl.getPath());
lbServiceUrl.setHandlerName(serviceUrl.getHandlerName());
lbServiceUrl.setType(serviceUrl.getType());
lbServiceUrl.setHost(getURL(host));
NodeList reverseNodes = urlNode.getChildNodes();
for (int j=0; j<reverseNodes.getLength(); j++) {
ReverseUrl reverseUrl = new DefaultReverseUrl(lbServiceUrl);
Node reverseNode = reverseNodes.item(j);
if (REVERSE.equals(reverseNode.getNodeName())) {
String reverse = reverseNode.getTextContent();
reverseUrl.setReverse(getURL(reverse));
lbServiceUrl.setReverseUrl(reverseUrl);
}
}
lbServiceUrl.startHealthCheck();
return lbServiceUrl;
}