public class BalancerServlet extends ProxyServlet
ProxyServlet.Transparent
_black, _client, _config, _context, _DontProxyHeaders, _hostHeader, _log, _white
Constructor and Description |
---|
BalancerServlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
filterResponseHeaderValue(String headerName,
String headerValue,
javax.servlet.http.HttpServletRequest request)
Extension point for remote server response header filtering.
|
String |
getHostHeader()
Get the hostHeader.
|
void |
init(javax.servlet.ServletConfig config) |
protected HttpURI |
proxyHttpURI(javax.servlet.http.HttpServletRequest request,
String uri) |
void |
setHostHeader(String hostHeader)
Set the hostHeader.
|
boolean |
validateDestination(String host,
String path)
Check the request hostname and path against white- and blacklist.
|
createHttpClient, createHttpClientInstance, createLogger, customizeContinuation, customizeExchange, destroy, getServletConfig, getServletInfo, handleConnect, handleOnConnectionFailed, handleOnException, handleOnExpire, proxyHttpURI, service
public void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class ProxyServlet
javax.servlet.ServletException
protected HttpURI proxyHttpURI(javax.servlet.http.HttpServletRequest request, String uri) throws MalformedURLException
proxyHttpURI
in class ProxyServlet
MalformedURLException
protected String filterResponseHeaderValue(String headerName, String headerValue, javax.servlet.http.HttpServletRequest request)
ProxyServlet
filterResponseHeaderValue
in class ProxyServlet
public String getHostHeader()
ProxyServlet
getHostHeader
in class ProxyServlet
public void setHostHeader(String hostHeader)
ProxyServlet
setHostHeader
in class ProxyServlet
hostHeader
- the hostHeader to setpublic boolean validateDestination(String host, String path)
ProxyServlet
validateDestination
in class ProxyServlet
host
- hostname to checkpath
- path to checkCopyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.