public class BalancerServlet extends ProxyServlet
ProxyServlet.ProxyInputStreamContentProvider, ProxyServlet.ProxyResponseListener, ProxyServlet.Transparent, ProxyServlet.TransparentDelegate
_log
Constructor and Description |
---|
BalancerServlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
filterResponseHeader(HttpServletRequest request,
String headerName,
String headerValue)
Extension point for remote server response header filtering.
|
void |
init() |
protected URI |
rewriteURI(HttpServletRequest request) |
boolean |
validateDestination(String host,
int port)
Checks the given
host and port against whitelist and blacklist. |
addViaHeader, addXForwardedHeaders, createHttpClient, createLogger, customizeProxyRequest, destroy, getBlackListHosts, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, newHttpClient, newProxyResponseListener, onClientRequestFailure, onResponseContent, onResponseFailure, onResponseHeaders, onResponseSuccess, onRewriteFailed, proxyRequestContent, service, setTimeout, viaHost
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
public void init() throws ServletException
init
in class ProxyServlet
ServletException
protected URI rewriteURI(HttpServletRequest request)
rewriteURI
in class ProxyServlet
protected String filterResponseHeader(HttpServletRequest request, String headerName, String headerValue)
ProxyServlet
filterResponseHeader
in class ProxyServlet
request
- the request to proxyheaderName
- the header nameheaderValue
- the header valuepublic boolean validateDestination(String host, int port)
ProxyServlet
host
and port
against whitelist and blacklist.validateDestination
in class ProxyServlet
host
- the host to checkport
- the port to checkCopyright © 1995-2015 Webtide. All Rights Reserved.