public class BalancerServlet extends ProxyServlet
ProxyServlet.ProxyInputStreamContentProvider, ProxyServlet.ProxyResponseListener, ProxyServlet.Transparent
AbstractProxyServlet.TransparentDelegate
_log, HOP_HEADERS
Constructor and Description |
---|
BalancerServlet() |
Modifier and Type | Method and Description |
---|---|
protected String |
filterServerResponseHeader(HttpServletRequest request,
Response serverResponse,
String headerName,
String headerValue) |
void |
init() |
protected String |
rewriteTarget(HttpServletRequest request) |
boolean |
validateDestination(String host,
int port)
Checks the given
host and port against whitelist and blacklist. |
newProxyResponseListener, onResponseContent, proxyRequestContent, service
addProxyHeaders, addViaHeader, addXForwardedHeaders, copyRequestHeaders, createHttpClient, createLogger, destroy, findConnectionHeaders, getBlackListHosts, getHostHeader, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, hasContent, newHttpClient, onClientRequestFailure, onProxyResponseFailure, onProxyResponseSuccess, onProxyRewriteFailed, onServerResponseHeaders, sendProxyRequest, setTimeout
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 AbstractProxyServlet
ServletException
protected String rewriteTarget(HttpServletRequest request)
rewriteTarget
in class AbstractProxyServlet
protected String filterServerResponseHeader(HttpServletRequest request, Response serverResponse, String headerName, String headerValue)
filterServerResponseHeader
in class AbstractProxyServlet
public boolean validateDestination(String host, int port)
AbstractProxyServlet
host
and port
against whitelist and blacklist.validateDestination
in class AbstractProxyServlet
host
- the host to checkport
- the port to checkCopyright © 1995-2015 Webtide. All Rights Reserved.