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)
originalRequestURIinto a Request-URL for the web application whose servlet context root is given by 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.
proxyToRequestURI is never
trueiff the request is directed to the leader.
full_prefix- The path prefix in the
originalRequestURIthat which corresponds to the
HALoadBalancerServletand which must be removed if the request is to be forwarded to a local service.
originalRequestURI- The original Request-URL from the HTTP Request-Line
proxyToRequestURI- The RequestURI for the root of the web application for the target service and never
request- The original request.
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.