Class BalancerServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
org.eclipse.jetty.ee10.proxy.ProxyServlet
org.eclipse.jetty.ee10.proxy.BalancerServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ProxyServlet
ProxyServlet.ProxyInputStreamRequestContent, ProxyServlet.ProxyResponseListener, ProxyServlet.TransparentNested classes/interfaces inherited from class AbstractProxyServlet
AbstractProxyServlet.TransparentDelegate -
Field Summary
Fields inherited from class AbstractProxyServlet
_log, CLIENT_REQUEST_ATTRIBUTE, HOP_HEADERSFields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringfilterServerResponseHeader(jakarta.servlet.http.HttpServletRequest request, Response serverResponse, String headerName, String headerValue) voidinit()protected StringrewriteTarget(jakarta.servlet.http.HttpServletRequest request) booleanvalidateDestination(String host, int port) Checks the givenhostandportagainst whitelist and blacklist.Methods inherited from class ProxyServlet
newProxyResponseListener, onContinue, onResponseContent, proxyRequestContent, serviceMethods inherited from class AbstractProxyServlet
addProxyHeaders, addViaHeader, addViaHeader, addXForwardedHeaders, clientRequestStatus, copyRequestHeaders, createHttpClient, createLogger, destroy, expects100Continue, findConnectionHeaders, getBlackListHosts, getHostHeader, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, hasContent, newClientConnector, newHttpClient, newHttpClient, newProxyRequest, onClientRequestFailure, onProxyResponseFailure, onProxyResponseSuccess, onProxyRewriteFailed, onServerResponseHeaders, proxyResponseStatus, sendProxyRequest, sendProxyResponseError, setTimeoutMethods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, serviceMethods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
BalancerServlet
public BalancerServlet()
-
-
Method Details
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
initin classAbstractProxyServlet- Throws:
jakarta.servlet.ServletException
-
rewriteTarget
- Overrides:
rewriteTargetin classAbstractProxyServlet
-
filterServerResponseHeader
protected String filterServerResponseHeader(jakarta.servlet.http.HttpServletRequest request, Response serverResponse, String headerName, String headerValue) - Overrides:
filterServerResponseHeaderin classAbstractProxyServlet
-
validateDestination
Description copied from class:AbstractProxyServletChecks the givenhostandportagainst whitelist and blacklist.- Overrides:
validateDestinationin classAbstractProxyServlet- Parameters:
host- the host to checkport- the port to check- Returns:
- true if it is allowed to be proxy to the given host and port
-