public interface IHARequestURIRewriter extends IHAPolicyLifeCycle
| Modifier and Type | Method and Description |
|---|---|
StringBuilder |
rewriteURI(boolean isLeaderRequest,
String full_prefix,
String originalRequestURI,
String proxyToRequestURI,
javax.servlet.http.HttpServletRequest request)
Rewrite the
originalRequestURI into a Request-URL for the web application whose servlet context root is
given by the proxyToRequestURI. |
destroy, initStringBuilder rewriteURI(boolean isLeaderRequest, String full_prefix, String originalRequestURI, String proxyToRequestURI, javax.servlet.http.HttpServletRequest request)
originalRequestURI into a Request-URL for the web application whose servlet context root is
given by the proxyToRequestURI.
Note: The proxyToRequestURI is include the protocol, host,
port, and servlet context path for the target service. It DOES NOT
include any information from the original request. The purpose of this
method is to modify the originalRequestURI in order to
obtain a fully qualified RequestURI for the service to which the request
will be proxied. For example:
full_prefix: /bigdata/LBS/leader
-or- full_prefix: /bigdata/LBS/read
originalRequestURI: http://ha1.example.com:8090/bigdata/LBS/read/sparql
proxyToRequestURI: http://ha3.example.com:8090/bigdata/
return: http://ha2.example.com:8090/bigdata/LBS/read/sparql
Note: this method is only invoked if we will proxy to another service.
Therefore, the proxyToRequestURI is never null.
isLeaderRequest - true iff the request is directed to the leader.full_prefix - The path prefix in the originalRequestURI that
which corresponds to the HALoadBalancerServlet and
which must be removed if the request is to be forwarded to a
local service.originalRequestURI - The original Request-URL from the HTTP Request-LineproxyToRequestURI - The RequestURI for the root of the web application for the
target service and never null.request - The original request.proxyToRequestURIServiceScore.getRequestURI()Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.