Package org.eclipse.jetty.ee10.proxy
Class AsyncMiddleManServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
org.eclipse.jetty.ee10.proxy.AsyncMiddleManServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
- Direct Known Subclasses:
AsyncMiddleManServlet.Transparent
Servlet 3.1 asynchronous proxy servlet with capability to intercept and modify request/response content.
Both the request processing and the I/O are asynchronous.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Allows applications to transform upstream and downstream content.static class
protected class
protected class
protected class
static class
Convenience extension ofAsyncMiddleManServlet
that offers transparent proxy functionalities.Nested classes/interfaces inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
AbstractProxyServlet.TransparentDelegate
-
Field Summary
Fields inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
_log, CLIENT_REQUEST_ATTRIBUTE, HOP_HEADERS
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected AsyncMiddleManServlet.ContentTransformer
newClientRequestContentTransformer
(jakarta.servlet.http.HttpServletRequest clientRequest, Request proxyRequest) protected jakarta.servlet.ReadListener
newProxyReadListener
(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse, Request proxyRequest, AsyncRequestContent content) protected AsyncRequestContent
newProxyRequestContent
(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse, Request proxyRequest) protected Response.CompleteListener
newProxyResponseListener
(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse) protected AsyncMiddleManServlet.ProxyWriter
newProxyWriteListener
(jakarta.servlet.http.HttpServletRequest clientRequest, Response proxyResponse) protected AsyncMiddleManServlet.ContentTransformer
newServerResponseContentTransformer
(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse, Response serverResponse) protected Runnable
onContinue
(jakarta.servlet.http.HttpServletRequest clientRequest, Request proxyRequest) protected void
service
(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse) Methods inherited from class org.eclipse.jetty.ee10.proxy.AbstractProxyServlet
addProxyHeaders, addViaHeader, addViaHeader, addXForwardedHeaders, clientRequestStatus, copyRequestHeaders, createHttpClient, createLogger, destroy, expects100Continue, filterServerResponseHeader, findConnectionHeaders, getBlackListHosts, getHostHeader, getHttpClient, getRequestId, getTimeout, getViaHost, getWhiteListHosts, hasContent, init, newClientConnector, newHttpClient, newHttpClient, newProxyRequest, onClientRequestFailure, onProxyResponseFailure, onProxyResponseSuccess, onProxyRewriteFailed, onServerResponseHeaders, proxyResponseStatus, rewriteTarget, sendProxyRequest, sendProxyResponseError, setTimeout, validateDestination
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, init, service
Methods inherited from class jakarta.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
AsyncMiddleManServlet
public AsyncMiddleManServlet()
-
-
Method Details
-
service
protected void service(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse) throws jakarta.servlet.ServletException, IOException - Overrides:
service
in classjakarta.servlet.http.HttpServlet
- Throws:
jakarta.servlet.ServletException
IOException
-
newProxyRequestContent
protected AsyncRequestContent newProxyRequestContent(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse, Request proxyRequest) -
newProxyReadListener
protected jakarta.servlet.ReadListener newProxyReadListener(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse, Request proxyRequest, AsyncRequestContent content) -
newProxyWriteListener
protected AsyncMiddleManServlet.ProxyWriter newProxyWriteListener(jakarta.servlet.http.HttpServletRequest clientRequest, Response proxyResponse) -
newProxyResponseListener
protected Response.CompleteListener newProxyResponseListener(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse) - Specified by:
newProxyResponseListener
in classAbstractProxyServlet
-
newClientRequestContentTransformer
protected AsyncMiddleManServlet.ContentTransformer newClientRequestContentTransformer(jakarta.servlet.http.HttpServletRequest clientRequest, Request proxyRequest) -
newServerResponseContentTransformer
protected AsyncMiddleManServlet.ContentTransformer newServerResponseContentTransformer(jakarta.servlet.http.HttpServletRequest clientRequest, jakarta.servlet.http.HttpServletResponse proxyResponse, Response serverResponse) -
onContinue
protected Runnable onContinue(jakarta.servlet.http.HttpServletRequest clientRequest, Request proxyRequest) - Overrides:
onContinue
in classAbstractProxyServlet
-