/** * Sets the absolute status page {@link URL} for this instance. The users can provide the <code> * statusPageUrlPath</code> if the status page resides in the same instance talking to * discovery, else in the cases where the instance is a proxy for some other server, it can * provide the full {@link URL}. If the full {@link URL} is provided it takes precedence. * * <p>The full {@link URL} should follow the format * http://${netflix.appinfo.hostname}:7001/Status where the value ${netflix.appinfo.hostname} is * replaced at runtime. * * @param relativeUrl - The {@link URL} path for status page for this instance * @param explicitUrl - The full {@link URL} for the status page * @return - Builder instance */ public Builder setStatusPageUrl(String relativeUrl, String explicitUrl) { String hostNameInterpolationExpression = "${" + namespace + "hostname}"; result.statusPageRelativeUrl = relativeUrl; result.statusPageExplicitUrl = explicitUrl; if (explicitUrl != null) { result.statusPageUrl = explicitUrl.replace(hostNameInterpolationExpression, result.hostName); } else if (relativeUrl != null) { result.statusPageUrl = HTTP_PROTOCOL + result.hostName + COLON + result.port + relativeUrl; } return this; }